o2o-infrakit/compose/docker-compose.yml

95 lines
2.6 KiB
YAML

services:
webserver:
build: ../docker/nginx/
logging:
driver: "${LOG_DRIVER}"
options:
max-file: "${LOG_OPT_MAXF}"
max-size: "${LOG_OPT_MAXS}"
working_dir: /application
container_name: nginx-uvicorn-webserver
volumes:
- ../www:/www
- ../script/:/script/
- ../config/web-server/conf.d/:/etc/nginx/conf.d/
- ../config/web-server/nginx_conf/nginx.conf:/etc/nginx/nginx.conf
- ../config/web-server/proxy_params:/etc/nginx/proxy_params
- ./ssl/certs/:/etc/ssl/certs/
- ./ssl/letsencrypt/:/etc/letsencrypt/
- ../log/:/log/
- ../script/logrotate/nginx/nginx:/etc/logrotate.d/nginx
ports:
- 80:80
- 443:443
# - 8000:8000
environment:
TZ: "Asia/Seoul"
restart: always
depends_on:
# - frontend-app
- uvicorn-app
uvicorn-app:
build: ../docker/gunicorn/
logging:
driver: "${LOG_DRIVER}"
options:
max-file: "${LOG_OPT_MAXF}"
max-size: "${LOG_OPT_MAXS}"
working_dir: /www/${PROJECT_DIR}
container_name: uvicorn-app
ports:
- 8000:8000
volumes:
- ../www:/www
- ../log:/log
- ../config/app-server/:/uvicorn
- ../script/logrotate/uvicorn/uvicorn:/etc/logrotate.d/uvicorn
command: bash -c "uv pip install --system --no-cache . && playwright install-deps && playwright install && exec gunicorn -c /uvicorn/gunicorn_uvicorn.conf.py "
environment:
TZ: "Asia/Seoul"
restart: always
redis:
image: redis:latest
logging:
driver: "${LOG_DRIVER}"
options:
max-file: "${LOG_OPT_MAXF}"
max-size: "${LOG_OPT_MAXS}"
container_name: redis_db
ports:
- 6379:6379
volumes:
- ./redis/data:/data
- ./redis/conf/:/usr/local/etc/redis/
labels:
- "name=redis"
- "mode=standalone"
environment:
TZ: "Asia/Seoul"
restart: always
command: redis-server /usr/local/etc/redis/redis.conf
# mysql:
# image: percona/percona-server:latest
# logging:
# driver: "${LOG_DRIVER}"
# options:
# max-file: "${LOG_OPT_MAXF}"
# max-size: "${LOG_OPT_MAXS}"
# container_name: mysql
# environment:
# MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
# TZ: Asia/Seoul
# ports:
# - "3306:3306"
# volumes:
# - ./mysql:/var/lib/mysql
# - ../config/database/mysql/my.cnf:/etc/my.cnf
# # - ../config/mysql/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
# - ../log/mysql:/var/log/mysql
# restart: always
# profiles:
# - mysql