2024-09-28 00:57:36 +07:00
|
|
|
version: '3.9'
|
|
|
|
|
|
|
|
networks:
|
|
|
|
dns_net:
|
|
|
|
driver: bridge
|
|
|
|
|
|
|
|
|
|
|
|
services:
|
2024-11-07 19:20:50 +07:00
|
|
|
# For ended simulations
|
2024-09-28 00:57:36 +07:00
|
|
|
mongo:
|
|
|
|
image: mongo
|
|
|
|
container_name: dns-mongo-db
|
|
|
|
environment:
|
|
|
|
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
|
|
|
|
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
|
|
|
|
MONGO_INITDB_DATABASE: ${MONGO_INITDB_DATABASE}
|
|
|
|
ports:
|
|
|
|
- '27017:27017'
|
|
|
|
networks:
|
|
|
|
- dns_net
|
|
|
|
volumes:
|
|
|
|
- mongodata:/data/db
|
|
|
|
restart: always
|
2024-11-07 19:20:50 +07:00
|
|
|
# For user management and etc
|
2024-09-28 00:57:36 +07:00
|
|
|
postgres:
|
|
|
|
image: postgres:13
|
|
|
|
container_name: dns-postgres-db
|
|
|
|
volumes:
|
|
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
environment:
|
|
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
|
|
ports:
|
|
|
|
- "${POSTGRES_PORT}:5432"
|
|
|
|
networks:
|
|
|
|
- dns_net
|
|
|
|
restart: always
|
2024-11-07 19:20:50 +07:00
|
|
|
# For web
|
2024-10-06 07:10:24 +07:00
|
|
|
nginx:
|
|
|
|
image: nginx:alpine
|
|
|
|
container_name: dns-nginx
|
|
|
|
ports:
|
|
|
|
- "${NGINX_PORT}:80"
|
|
|
|
volumes:
|
|
|
|
# - ./frontend/geotouchka-web-application/build:/usr/share/nginx/html
|
|
|
|
- ./nginx.conf:/etc/nginx/nginx.conf
|
|
|
|
networks:
|
|
|
|
- dns_net
|
|
|
|
depends_on:
|
|
|
|
- front
|
|
|
|
restart: always
|
2024-11-07 19:20:50 +07:00
|
|
|
# Api server - For kernel communication
|
2024-09-28 00:57:36 +07:00
|
|
|
server:
|
|
|
|
container_name: dns-server
|
|
|
|
build:
|
|
|
|
context: ./src/server
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
env_file: ".env"
|
|
|
|
ports:
|
|
|
|
- "8080:8080"
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
2024-10-05 12:19:35 +07:00
|
|
|
- mongo
|
2024-09-28 00:57:36 +07:00
|
|
|
networks:
|
|
|
|
- dns_net
|
|
|
|
restart: always
|
2024-11-07 19:20:50 +07:00
|
|
|
# Socket hub - For websocket communication
|
|
|
|
hub:
|
|
|
|
container_name: dns-hub
|
2024-10-12 07:37:21 +07:00
|
|
|
build:
|
2024-11-07 19:20:50 +07:00
|
|
|
context: ./src/microservices/hub
|
2024-10-12 07:37:21 +07:00
|
|
|
dockerfile: Dockerfile
|
|
|
|
env_file: ".env"
|
|
|
|
ports:
|
2024-11-16 14:12:21 +07:00
|
|
|
- "10001:10000"
|
2024-10-12 07:37:21 +07:00
|
|
|
networks:
|
|
|
|
- dns_net
|
|
|
|
restart: always
|
2024-11-07 19:20:50 +07:00
|
|
|
# Frontend - For web ui
|
2024-09-28 00:57:36 +07:00
|
|
|
front:
|
|
|
|
container_name: dns-ui
|
|
|
|
build:
|
2024-10-24 14:43:02 +07:00
|
|
|
context: ./src/usn-frontend
|
|
|
|
dockerfile: test.Dockerfile
|
2024-09-28 00:57:36 +07:00
|
|
|
env_file: ".env"
|
2024-10-11 08:12:41 +07:00
|
|
|
volumes:
|
2024-10-24 14:43:02 +07:00
|
|
|
- ./src/usn-frontend:/app
|
2024-10-11 08:12:41 +07:00
|
|
|
working_dir: /app
|
2024-10-24 14:43:02 +07:00
|
|
|
command: ["npm", "run", "dev"]
|
2024-09-28 00:57:36 +07:00
|
|
|
ports:
|
|
|
|
- "3000:3000"
|
|
|
|
networks:
|
|
|
|
- dns_net
|
|
|
|
restart: always
|
2024-11-16 14:12:21 +07:00
|
|
|
|
|
|
|
#
|
|
|
|
math:
|
|
|
|
container_name: dns-math
|
|
|
|
build:
|
|
|
|
context: ./src/microservices/py-simulation
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
env_file: ".env"
|
2024-11-07 19:20:50 +07:00
|
|
|
ports:
|
2024-11-17 04:24:12 +07:00
|
|
|
- "10000:5000"
|
2024-11-07 19:20:50 +07:00
|
|
|
networks:
|
|
|
|
- dns_net
|
|
|
|
restart: always
|
|
|
|
|
2024-11-16 14:12:21 +07:00
|
|
|
|
|
|
|
# For messaging
|
2024-11-07 19:20:50 +07:00
|
|
|
|
2024-09-28 00:57:36 +07:00
|
|
|
volumes:
|
|
|
|
postgres_data:
|
|
|
|
mongodata:
|
|
|
|
driver: local
|