122 lines
2.5 KiB
YAML
122 lines
2.5 KiB
YAML
version: "3.3"
|
|
|
|
services:
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: nginx
|
|
env_file: .env
|
|
depends_on:
|
|
- api
|
|
|
|
# command: sh -c "envsubst < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
|
|
ports:
|
|
- 8080:8080
|
|
volumes:
|
|
- ./conf/nginx.conf:/etc/nginx/conf.d/default.conf
|
|
networks:
|
|
- pongNetwork
|
|
|
|
react_app:
|
|
image: node:latest
|
|
container_name: react_app
|
|
working_dir: /app
|
|
# depends_on:
|
|
# - nginx
|
|
ports:
|
|
<<<<<<< HEAD
|
|
- 8081:8081
|
|
=======
|
|
- 8001:8001
|
|
>>>>>>> origin/ereali
|
|
volumes:
|
|
- ./containers/react:/app
|
|
# - ./containers/react:/app
|
|
networks:
|
|
- pongNetwork
|
|
entrypoint: ["sh", "-c" , "npm install && npm run start:dev"]
|
|
|
|
|
|
api:
|
|
image: node:latest
|
|
container_name: api
|
|
working_dir: /app
|
|
ports:
|
|
- 3000:3000
|
|
env_file: .env
|
|
depends_on:
|
|
- postgresql
|
|
networks:
|
|
- pongNetwork
|
|
volumes:
|
|
- ./containers/api:/app
|
|
entrypoint: ["sh", "-c" , "npm install && npm run start:dev"]
|
|
|
|
postgresql:
|
|
env_file: .env
|
|
image: postgres:14.1-alpine
|
|
restart: unless-stopped
|
|
container_name: postgresql
|
|
environment:
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
ports:
|
|
- 5432:5432
|
|
volumes:
|
|
- db:/var/lib/postgresql/data
|
|
- ./conf/init.sql:/docker-entrypoint-initdb.d/create_tables.sql
|
|
networks:
|
|
- pongNetwork
|
|
|
|
pong:
|
|
image: node:latest
|
|
container_name: pong
|
|
working_dir: /app
|
|
ports:
|
|
- 4000:4000
|
|
env_file: .env
|
|
networks:
|
|
- pongNetwork
|
|
volumes:
|
|
- ./containers/pong:/app
|
|
entrypoint: ["sh", "-c" , "npm install && npm run start:dev"]
|
|
|
|
chat:
|
|
image: node:latest
|
|
container_name: chat
|
|
working_dir: /app
|
|
ports:
|
|
- 4001:4001
|
|
env_file: .env
|
|
networks:
|
|
- pongNetwork
|
|
volumes:
|
|
- ./containers/chat:/app
|
|
entrypoint: ["sh", "-c" , "npm install && npm run start:dev"]
|
|
|
|
|
|
networks:
|
|
pongNetwork:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
# front_files:
|
|
# driver: local
|
|
# driver_opts:
|
|
# type: none
|
|
# o: 'bind'
|
|
# device: '/frontend'
|
|
# dbdata:
|
|
# driver: local
|
|
# driver_opts:
|
|
# type: none
|
|
# o: 'bind'
|
|
# device: '/home/apommier/data/mariadb'
|
|
# back:
|
|
# driver: local
|
|
# driver_opts:
|
|
# type: none
|
|
# o: 'bind'
|
|
# device: '/backend'
|
|
db:
|
|
driver: local |