mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
Project Initialization
This commit is contained in:
126
infrastructure/docker/docker-compose.dev.yml
Normal file
126
infrastructure/docker/docker-compose.dev.yml
Normal file
@@ -0,0 +1,126 @@
|
||||
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: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: edr_freight
|
||||
ports:
|
||||
- "5433:5432"
|
||||
volumes:
|
||||
- postgres-freight-data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- edr-network
|
||||
|
||||
postgres-passenger:
|
||||
image: postgres:17-alpine
|
||||
container_name: edr-postgres-passenger
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: edr_passenger
|
||||
ports:
|
||||
- "5434:5432"
|
||||
volumes:
|
||||
- postgres-passenger-data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- edr-network
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: edr-redis
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
networks:
|
||||
- edr-network
|
||||
|
||||
edr-freight-api:
|
||||
build:
|
||||
context: ../../
|
||||
dockerfile: apps/edr-freight-api/Dockerfile
|
||||
container_name: edr-freight-api
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- postgres-freight
|
||||
- redis
|
||||
environment:
|
||||
NODE_ENV: development
|
||||
PORT: 3001
|
||||
DB_HOST: postgres-freight
|
||||
DB_PORT: 5432
|
||||
DB_NAME: edr_freight
|
||||
DB_USER: postgres
|
||||
DB_PASSWORD: postgres
|
||||
REDIS_HOST: redis
|
||||
REDIS_PORT: 6379
|
||||
ports:
|
||||
- "3001:3001"
|
||||
networks:
|
||||
- edr-network
|
||||
|
||||
edr-freight-web:
|
||||
build:
|
||||
context: ../../
|
||||
dockerfile: apps/edr-freight-web/Dockerfile
|
||||
container_name: edr-freight-web
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- edr-freight-api
|
||||
ports:
|
||||
- "5173:5173"
|
||||
networks:
|
||||
- edr-network
|
||||
|
||||
edr-passenger-api:
|
||||
build:
|
||||
context: ../../
|
||||
dockerfile: apps/edr-passenger-api/Dockerfile
|
||||
container_name: edr-passenger-api
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- postgres-passenger
|
||||
- redis
|
||||
environment:
|
||||
NODE_ENV: development
|
||||
PORT: 3002
|
||||
DB_HOST: postgres-passenger
|
||||
DB_PORT: 5432
|
||||
DB_NAME: edr_passenger
|
||||
DB_USER: postgres
|
||||
DB_PASSWORD: postgres
|
||||
REDIS_HOST: redis
|
||||
REDIS_PORT: 6379
|
||||
ports:
|
||||
- "3002:3002"
|
||||
networks:
|
||||
- edr-network
|
||||
|
||||
edr-passenger-web:
|
||||
build:
|
||||
context: ../../
|
||||
dockerfile: apps/edr-passenger-web/Dockerfile
|
||||
container_name: edr-passenger-web
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- edr-passenger-api
|
||||
ports:
|
||||
- "5174:5174"
|
||||
networks:
|
||||
- edr-network
|
||||
134
infrastructure/docker/docker-compose.prod.yml
Normal file
134
infrastructure/docker/docker-compose.prod.yml
Normal file
@@ -0,0 +1,134 @@
|
||||
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
|
||||
Reference in New Issue
Block a user