alai-server/docker-compose.yml

67 lines
1.2 KiB
YAML
Raw Normal View History

2022-06-29 21:26:05 -04:00
version: '3.7'
x-common-variables: &common-variables
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
services:
database:
image: mariadb:10.8.3
restart: on-failure
cap_add:
- SYS_NICE
volumes:
- database:/var/lib/mysql
networks:
- network
ports:
- "${MYSQL_PORT}:3306"
environment:
<<: *common-variables
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_ROOT_HOST: ${MYSQL_HOST}
nginx:
2022-07-29 11:28:20 -04:00
image: nginx:1.23.1
2022-06-29 21:26:05 -04:00
depends_on:
- backend
restart: on-failure
volumes:
- "./nginx.conf:/etc/nginx/conf.d/default.conf"
- "./game:/usr/share/nginx/html"
networks:
- network
ports:
- "4050:80"
frontend:
restart: on-failure
stdin_open: true
environment:
- CHOKIDAR_USEPOLLING=true
build:
dockerfile: Dockerfile
context: ./frontend
networks:
- network
backend:
restart: on-failure
build:
dockerfile: Dockerfile
context: "./backend"
depends_on:
- database
networks:
- network
environment:
<<: *common-variables
MYSQL_HOST_IP: ${MYSQL_HOST_IP}
volumes:
database:
networks:
network: