alai-server/docker-compose.yml

67 lines
1.2 KiB
YAML
Raw Permalink 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:
2023-01-18 22:47:19 -03:00
image: mariadb:10.10.2
2022-06-29 21:26:05 -04:00
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:
2023-01-18 22:47:19 -03:00
image: nginx:1.23.3
2022-06-29 21:26:05 -04:00
depends_on:
- backend
restart: on-failure
volumes:
- "./nginx.conf:/etc/nginx/conf.d/default.conf"
- "./download:/usr/share/nginx/html"
2022-06-29 21:26:05 -04:00
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: