Welcome to 👋 PodFiles 👋, a full-stack web application project that includes a file-server backend and a React front-end, designed to run using Podman containers and Ansible for automation. The application enables file uploads and serves files through a simple and user-friendly interface.
The Project is divided into four repos
project-root repo/ - the-podman-files (Current repo)
├── backend/ # Node.js file server (pod-files-backend)
├── frontend/ # React application for the front-end (pod-files-frontend)
└── ansible/ # Ansible playbooks for automation (pod-files-ansible-automation)
[https://github.com/aleksejunas/pod-files-backend]
[https://github.com/aleksejunas/pod-files-frontend]
[https://github.com/aleksejunas/pod-files-ansible-automation]
- File Server: A Node.js server with Express and Multer for handling file uploads.
- React Front-End: A responsive interface for uploading and accessing files.
- Containerization: Both backend and frontend are Dockerized and run in a Podman pod.
- Automation: Ansible playbooks for automated deployment and configuration.
Ensure you have the following installed:
- Node.js (v16 or higher)
- Podman
- Ansible (for automation)
- Git
-
Clone the Repository:
git clone https://github.com/yourusername/aleksejunas-fileserver.git cd aleksejunas-fileserver
-
Backend Setup:
cd backend pnpm install
-
Frontend Setup
cd frontend pnpm install
- Build Docker Images:
cd backend
podman build -t my-backend-image .
cd ../frontend
podman build -t my-frontend-image .
- Create and Run a Pod:
# Aleksejunas Fileserver Project
This is a full-stack web application project that includes a file server backend and a React front-end, designed to run using Podman containers. The application enables file uploads and serves files through a simple and user-friendly interface.
## Project Structure
project-root/ ├── backend/ # Node.js file server ├── frontend/ # React application for the front-end └── ansible/ # Ansible playbooks for automation
## Features
- **File Server**: A Node.js server with Express and Multer for handling file uploads.
- **React Front-End**: A responsive interface for uploading and accessing files.
- **Containerization**: Both backend and frontend are Dockerized and run in a Podman pod.
- **Automation**: Ansible playbooks for automated deployment and configuration.
## Getting Started
### Prerequisites
Ensure you have the following installed:
- Node.js (v16 or higher)
- Podman
- Ansible (for automation)
- Git
### Installation
1. **Clone the Repository**:
```bash
git clone https://github.com/yourusername/aleksejunas-fileserver.git
cd aleksejunas-fileserver
-
Backend Setup:
cd backend npm install
-
Frontend Setup:
cd ../frontend npm install
-
Build Docker Images:
cd backend podman build -t my-backend-image . cd ../frontend podman build -t my-frontend-image .
-
Create and Run a Pod:
podman pod create --name mypod -p 8080:3000 -p 8081:3001 podman run -d --pod mypod --name backend-container my-backend-image podman run -d --pod mypod --name frontend-container my-frontend-image
- Access the front-end at
http://localhost:8080
- The backend API runs on
http://localhost:8081
-
Prepare Inventory: Create an inventory file:
[fileserver] your-server-ip ansible_user=your-ssh-username
-
Run the Playbook:
ansible-playbook -i inventory.ini ansible/deploy_fileserver.yml
- Add user authentication.
- Integrate cloud storage options.
- Implement security measures such as SSL/TLS.
Contributions are welcome! Feel free to open issues or create pull requests.
This project is licensed under the MIT License. See LICENSE
for details.
Developed by Your Name
For inquiries, please email: [email protected]