WORK IN PROGRESS |
This repository hosts a Full-Stack Web Application built with React.js, Golang, and PostgreSQL. The goal of the project is to gain knowledge in React (using Typescript, architecture based on Feature-Sliced Design), Golang libraries (Gin, Gorm), Redis storage, Postgres database and Docker.
The docker-compose.yml
file defines four Docker services:
- Utilizes PostgreSQL Docker image.
- Exposes port 5432 for access between containers (especially for
api
) and 3306 from outside.
- Utilizes Redis Docker image.
- Exposes port 6379 for access between containers (especially for
api
).
- Dockerizes the Golang backend application.
- Exposes port 8080 for accessing between containers (especially for
web
). - Links to the
db
service for database connectivity andstorage
for caching. - Builds application and hosts it inside Alpine Linux container for container size minimizing.
- Dockerizes the React.js frontend application.
- Mounts the application code and node_modules for development.
- Exposes port 80 for accessing the application.
- Links to the
api
service for server connectivity. - Builds application and hosts it on Nginx server.
To set up and run the Miadok Chaladok application:
- Ensure Docker and Docker Compose are installed on your system.
- Clone this repository to your local machine.
- Navigate to the project directory.
cd MiadokChaladok-Go
- Build and start the application using Docker Compose.
docker-compose up --build
- Access the application in your web browser at
http://localhost:80
or justhttp://localhost
. - To shut down the application and clean up Docker resources when you're done:
- Press
Ctrl+C
in the terminal where Docker Compose is running to stop the containers. - To remove the stopped containers, networks, and volumes associated with this project, run:
docker-compose down
- Additionally, you can remove any unused Docker resources (dangling images, containers, and networks) by running:
docker system prune -a
- These commands will help you shut down the application and free up any unused Docker resources.
Idea of web application and design layouts made by @butercupa.