mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
135 lines
2.8 KiB
YAML
135 lines
2.8 KiB
YAML
version: "3.9"
|
|
|
|
networks:
|
|
edr-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
postgres-freight-data:
|
|
postgres-passenger-data:
|
|
redis-data:
|
|
|
|
services:
|
|
postgres-freight:
|
|
image: postgres:17-alpine
|
|
container_name: edr-postgres-freight
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: ${DB_USER}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
POSTGRES_DB: ${DB_NAME_FREIGHT}
|
|
volumes:
|
|
- postgres-freight-data:/var/lib/postgresql/data
|
|
networks:
|
|
- edr-network
|
|
|
|
postgres-passenger:
|
|
image: postgres:17-alpine
|
|
container_name: edr-postgres-passenger
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: ${DB_USER}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
POSTGRES_DB: ${DB_NAME_PASSENGER}
|
|
volumes:
|
|
- postgres-passenger-data:/var/lib/postgresql/data
|
|
networks:
|
|
- edr-network
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: edr-redis
|
|
restart: always
|
|
volumes:
|
|
- redis-data:/data
|
|
networks:
|
|
- edr-network
|
|
|
|
edr-freight-api:
|
|
build:
|
|
context: ../../
|
|
dockerfile: apps/edr-freight-api/Dockerfile
|
|
container_name: edr-freight-api
|
|
restart: always
|
|
depends_on:
|
|
- postgres-freight
|
|
- redis
|
|
environment:
|
|
NODE_ENV: production
|
|
PORT: 3001
|
|
DB_HOST: postgres-freight
|
|
DB_PORT: 5432
|
|
DB_NAME: ${DB_NAME_FREIGHT}
|
|
DB_USER: ${DB_USER}
|
|
DB_PASSWORD: ${DB_PASSWORD}
|
|
REDIS_HOST: redis
|
|
expose:
|
|
- "3001"
|
|
networks:
|
|
- edr-network
|
|
|
|
edr-freight-web:
|
|
build:
|
|
context: ../../
|
|
dockerfile: apps/edr-freight-web/Dockerfile
|
|
container_name: edr-freight-web
|
|
restart: always
|
|
depends_on:
|
|
- edr-freight-api
|
|
expose:
|
|
- "5173"
|
|
networks:
|
|
- edr-network
|
|
|
|
edr-passenger-api:
|
|
build:
|
|
context: ../../
|
|
dockerfile: apps/edr-passenger-api/Dockerfile
|
|
container_name: edr-passenger-api
|
|
restart: always
|
|
depends_on:
|
|
- postgres-passenger
|
|
- redis
|
|
environment:
|
|
NODE_ENV: production
|
|
PORT: 3002
|
|
DB_HOST: postgres-passenger
|
|
DB_PORT: 5432
|
|
DB_NAME: ${DB_NAME_PASSENGER}
|
|
DB_USER: ${DB_USER}
|
|
DB_PASSWORD: ${DB_PASSWORD}
|
|
REDIS_HOST: redis
|
|
expose:
|
|
- "3002"
|
|
networks:
|
|
- edr-network
|
|
|
|
edr-passenger-web:
|
|
build:
|
|
context: ../../
|
|
dockerfile: apps/edr-passenger-web/Dockerfile
|
|
container_name: edr-passenger-web
|
|
restart: always
|
|
depends_on:
|
|
- edr-passenger-api
|
|
expose:
|
|
- "5174"
|
|
networks:
|
|
- edr-network
|
|
|
|
nginx:
|
|
image: nginx:1.27-alpine
|
|
container_name: edr-nginx
|
|
restart: always
|
|
ports:
|
|
- "80:80"
|
|
depends_on:
|
|
- edr-freight-web
|
|
- edr-freight-api
|
|
- edr-passenger-web
|
|
- edr-passenger-api
|
|
volumes:
|
|
- ../../infrastructure/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
networks:
|
|
- edr-network
|