105 lines
2.3 KiB
YAML
105 lines
2.3 KiB
YAML
|
version: "2.2"
|
||
|
|
||
|
services:
|
||
|
app:
|
||
|
image: xf/fisk:prod
|
||
|
build: ${PORTAINER_GIT_DIR}/docker/prod
|
||
|
volumes:
|
||
|
- ${PORTAINER_GIT_DIR}:/code
|
||
|
# - ${PORTAINER_GIT_DIR}/docker/prod/uwsgi.ini:/conf/uwsgi.ini
|
||
|
- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
|
||
|
- ${APP_DATABASE_FILE}:/code/db.sqlite3
|
||
|
#ports:
|
||
|
# - "8000:8000" # uwsgi socket
|
||
|
env_file:
|
||
|
- ../stack.env
|
||
|
volumes_from:
|
||
|
- tmp
|
||
|
depends_on:
|
||
|
# redis:
|
||
|
# condition: service_healthy
|
||
|
migration:
|
||
|
condition: service_started
|
||
|
collectstatic:
|
||
|
condition: service_started
|
||
|
|
||
|
migration:
|
||
|
image: xf/fisk:prod
|
||
|
build: ./docker/prod
|
||
|
command: sh -c '. /venv/bin/activate && python manage.py migrate --noinput'
|
||
|
volumes:
|
||
|
- ${PORTAINER_GIT_DIR}:/code
|
||
|
- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
|
||
|
- ${APP_DATABASE_FILE}:/code/db.sqlite3
|
||
|
env_file:
|
||
|
- ../stack.env
|
||
|
|
||
|
collectstatic:
|
||
|
image: xf/fisk:prod
|
||
|
build: ./docker/prod
|
||
|
command: sh -c '. /venv/bin/activate && python manage.py collectstatic --noinput'
|
||
|
volumes:
|
||
|
- ${PORTAINER_GIT_DIR}:/code
|
||
|
- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
|
||
|
- ${APP_DATABASE_FILE}:/code/db.sqlite3
|
||
|
env_file:
|
||
|
- ../stack.env
|
||
|
|
||
|
nginx:
|
||
|
image: nginx:latest
|
||
|
ports:
|
||
|
- ${APP_PORT}:9999
|
||
|
ulimits:
|
||
|
nproc: 65535
|
||
|
nofile:
|
||
|
soft: 65535
|
||
|
hard: 65535
|
||
|
volumes:
|
||
|
- ${PORTAINER_GIT_DIR}:/code
|
||
|
- ${PORTAINER_GIT_DIR}/docker/nginx/conf.d:/etc/nginx/conf.d
|
||
|
volumes_from:
|
||
|
- tmp
|
||
|
depends_on:
|
||
|
app:
|
||
|
condition: service_started
|
||
|
|
||
|
|
||
|
# volumes_from:
|
||
|
# - tmp
|
||
|
# depends_on:
|
||
|
# redis:
|
||
|
# condition: service_healthy
|
||
|
|
||
|
tmp:
|
||
|
image: busybox
|
||
|
command: chmod -R 777 /var/run/socks
|
||
|
volumes:
|
||
|
- /var/run/socks
|
||
|
|
||
|
# redis:
|
||
|
# image: redis
|
||
|
# command: redis-server /etc/redis.conf
|
||
|
# ulimits:
|
||
|
# nproc: 65535
|
||
|
# nofile:
|
||
|
# soft: 65535
|
||
|
# hard: 65535
|
||
|
# volumes:
|
||
|
# - ${PORTAINER_GIT_DIR}/docker/redis.conf:/etc/redis.conf
|
||
|
# - redis_data:/data
|
||
|
# volumes_from:
|
||
|
# - tmp
|
||
|
# healthcheck:
|
||
|
# test: "redis-cli -s /var/run/redis/redis.sock ping"
|
||
|
# interval: 2s
|
||
|
# timeout: 2s
|
||
|
# retries: 15
|
||
|
|
||
|
networks:
|
||
|
default:
|
||
|
external:
|
||
|
name: xf
|
||
|
|
||
|
# volumes:
|
||
|
# redis_data: {}
|