tabun/docker-compose.yml

85 lines
1.7 KiB
YAML

version: '3.7'
volumes:
db:
log:
redis:
static:
storage:
elastic:
services:
app:
build:
context: .
dockerfile: docker/tabun/Dockerfile
target: production
volumes:
- static:/static
- storage:/storage
- log:/log
depends_on:
- db
- redis
- tasks
environment:
MARIADB_USER: ${MARIADB_USER:-tabun}
MARIADB_PASSWORD: ${MARIADB_PASSWORD:-tabun}
MARIADB_DATABASE: ${MARIADB_DATABASE:-tabun}
networks:
default:
aliases:
- tabun
gateway:
image: nginx:alpine
ports:
- '8000:80'
restart: always
volumes:
- ./docker/gateway/nginx.conf:/etc/nginx/nginx.conf
- static:/app/static
- storage:/storage
depends_on:
- app
db:
build:
context: .
dockerfile: docker/mariadb/Dockerfile
environment:
MARIADB_USER: ${MARIADB_USER:-tabun}
MARIADB_PASSWORD: ${MARIADB_PASSWORD:-tabun}
MARIADB_DATABASE: ${MARIADB_DATABASE:-tabun}
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: ${MARIADB_ALLOW_EMPTY_ROOT_PASSWORD:-true}
volumes:
- ./docker/mariadb/conf.d:/etc/mysql/conf.d/
- db:/var/lib/mysql
tasks:
build:
context: .
dockerfile: docker/celery/Dockerfile
depends_on:
- redis
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- CELERY_MAILER_HOST=host.docker.internal
- CELERY_MAILER_PORT=25
redis:
image: redis:alpine
restart: always
volumes:
- redis:/data
elastic:
image: elasticsearch:8.2.0
restart: always
volumes:
- elastic:/usr/share/elasticsearch/data
environment:
- discovery.type=single-node
- xpack.security.enabled=false