https://github.com/santilapi13/docker_compose_fullstack
Simple fullstack application using 3 Docker π³ containers for: CouchDB, React frontend and Express backend.
https://github.com/santilapi13/docker_compose_fullstack
couchdb docker docker-compose express fullstack-development
Last synced: 2 months ago
JSON representation
Simple fullstack application using 3 Docker π³ containers for: CouchDB, React frontend and Express backend.
- Host: GitHub
- URL: https://github.com/santilapi13/docker_compose_fullstack
- Owner: santilapi13
- Created: 2024-05-23T16:42:14.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-09T14:45:17.000Z (over 1 year ago)
- Last Synced: 2025-08-13T03:36:56.460Z (4 months ago)
- Topics: couchdb, docker, docker-compose, express, fullstack-development
- Language: JavaScript
- Homepage:
- Size: 83 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fullstack application with Docker Compose π³
This is a fullstack application with a React frontend, an Express and Node.js backend and a CouchDB database.
## Frontend βοΈ
The frontend is a simple web page that displays a list of characters from films and an input field used to send new characters to the database. It's located in the "frontend_container" directory. The Alpine Linux image is used to build the frontend container from the Dockerfile.
The container port 8080 is mapped to the host port 3001: http://localhost:3001
## Backend π’
The backend is a REST API that serves the list of characters to the frontend after fetching them from the database. It also receives new characters from the frontend and sends them to the database. The backend is constantly loading random characters to the database. It's located in the "backend_container" directory. The Node image is used to build the backend container from the Dockerfile.
The container port 3000 is mapped to the host port 3000, in the /data endpoint: http://localhost:3000/data
## Database ποΈ
The database is a CouchDB instance that stores the characters and persists in the "dbdata" volume after the container is stopped. The container is loaded directly from the official CouchDB image.
The container port 5984 is mapped to the host port 5984 http://localhost:5984/_utils
# Members
- Santiago Lapiana
- Wenceslao Γvalos
# Requirements
Docker and Docker Compose installed on your machine (https://docs.docker.com/engine/install/)
# How to run
1. Clone the repository with `git clone https://github.com/santilapi13/Docker_Compose_Fullstack.git`
2. Navigate to the project directory with `cd Docker_Compose_Fullstack`
3. Set environment variables in a `.env` file, in the same directory as `.env.example` file.
```
DB_URL = 'http://couchdb_container:5984/data'
COUCH_USER = 'admin'
COUCH_PASS = 'admin'
```
5. Run `docker-compose up --build` to build and start the containers
6. Open your browser and go to http://localhost:3001 to see the frontend