shiro873 / docker-compose-aws

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multi-Container Application with Docker Compose

This project uses Docker Compose to run a multi-container application consisting of the following services:

  • Traefik: Reverse Proxy server for routing traffic.
  • Laravel: Laravel API server.
  • Node.js Express: Node.js Express API server.
  • Flask: Python Flask api service.
  • React.js: React.js web application.
  • Databases:
    • MySQL
    • PostgreSQL
    • MongoDB
  • Redis: In-memory cache server.

Prerequisites:

Setup:

  1. Clone this repository.
  2. Update the environment variables in docker-compose.yml with your desired passwords and database names.
  3. Build and run the application:
    docker-compose up -d
    This will build the images for each service and start them in detached mode.
  4. To run specific services
    docker-compose up -d <service 1> <service 2>
    for example
    docker-compose up -d node react ...
    

Accessing Services:

Developing with Docker Compose:

By mounting your local code directories as volumes in the corresponding services, you can develop and see changes reflected within the containers without rebuilding the images.

  • Edit code in the following directories:
    • ./laravel for Laravel code.
    • ./node for Node.js Express code.
    • ./react for React.js code.
    • ./python for Flask code.
  • Changes will be automatically reflected when the container detects modifications.

Stopping and Removing Services:

  • To stop all services:
    docker-compose down
  • To remove all services and volumes:
    docker-compose down -v

For Development:

  • To restart all services:
    docker-compose down && docker-compose up -d

About

License:MIT License


Languages

Language:PHP 54.8%Language:Blade 39.4%Language:HTML 1.9%Language:Dockerfile 1.4%Language:JavaScript 1.1%Language:CSS 1.0%Language:Shell 0.4%Language:Python 0.2%