dsql-admin/dsql-app/docker-compose.yml
2024-11-06 13:57:20 +01:00

81 lines
2.4 KiB
YAML

name: datasquirel
services:
setup:
build:
context: .
dockerfile: Dockerfile.Setup
env_file: .env
networks:
datasquirel:
ipv4_address: 172.72.0.14
container_name: datasquirel-setup
hostname: datasquirel-setup
volumes:
- ${DSQL_VOLUME_APP:-.}:/app
- ${DSQL_VOLUME_DB_SSL:-../dsql-data/ssl}:/ssl
webapp:
build:
context: .
dockerfile: ${DSQL_DOCKERFILE:-Dockerfile}
env_file: .env
depends_on:
- db
networks:
datasquirel:
ipv4_address: 172.72.0.24
container_name: datasquirel-site
hostname: datasquirel-site
volumes:
- ${DSQL_VOLUME_STATIC:-../dsql-data/static}:/static
- ${DSQL_VOLUME_APP:-.}:/app
ports:
- ${DSQL_PORT:-7070}:${DSQL_PORT:-7070}
environment:
- DSQL_SSL_DIR=/app/ssl
static:
image: nginx:alpine
env_file: .env
networks:
datasquirel:
ipv4_address: 172.72.0.28
depends_on:
webapp:
condition: service_healthy
container_name: datasquirel-static
hostname: datasquirel-static
volumes:
- ${DSQL_VOLUME_STATIC_CONFIGURATION_FILE:-../dsql-data/static-config/default.conf}:/etc/nginx/conf.d/default.conf
- ${DSQL_VOLUME_STATIC:-../dsql-data/static}:/static
ports:
- ${DSQL_STATIC_SERVER_PORT}:80
db:
image: mariadb
env_file: .env
networks:
datasquirel:
ipv4_address: 172.72.0.32
depends_on:
setup:
condition: service_completed_successfully
container_name: datasquirel-site-database
hostname: ${DSQL_DB_HOSTNAME:-datasquirel-site-database}
volumes:
- ${DSQL_VOLUME_DB:-../dsql-data/db}:/var/lib/mysql
- ${DSQL_VOLUME_DB_CONFIG:-../dsql-data/db-config}:/etc/mysql/conf.d
- ${DSQL_VOLUME_DB_SSL:-../dsql-data/ssl}:/ssl
environment:
- MARIADB_ROOT_PASSWORD=${DSQL_MARIADB_ROOT_PASSWORD}
ports:
- ${DSQL_DB_EXPOSED_PORT:-3306}:3306
networks:
datasquirel:
driver: bridge
ipam:
config:
- subnet: 172.72.0.0/16
gateway: 172.72.0.1