192 lines
4.5 KiB
YAML
192 lines
4.5 KiB
YAML
version: "2.2"
|
|
|
|
services:
|
|
app:
|
|
image: pathogen/neptune:latest
|
|
container_name: neptune
|
|
build:
|
|
context: .
|
|
args:
|
|
OPERATION: ${OPERATION}
|
|
volumes:
|
|
- ${PORTAINER_GIT_DIR}:/code
|
|
- ${PORTAINER_GIT_DIR}/docker/uwsgi.ini:/conf/uwsgi.ini
|
|
- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
|
|
- ${APP_DATABASE_FILE}:/code/db.sqlite3
|
|
- neptune_static:${STATIC_ROOT}
|
|
env_file:
|
|
- stack.env
|
|
volumes_from:
|
|
- tmp
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
migration:
|
|
condition: service_started
|
|
collectstatic:
|
|
condition: service_started
|
|
networks:
|
|
- default
|
|
- pathogen
|
|
- elastic
|
|
|
|
processing:
|
|
image: pathogen/neptune:latest
|
|
container_name: processing_neptune
|
|
build:
|
|
context: .
|
|
args:
|
|
OPERATION: ${OPERATION}
|
|
command: sh -c '. /venv/bin/activate && python manage.py processing'
|
|
volumes:
|
|
- ${PORTAINER_GIT_DIR}:/code
|
|
- ${PORTAINER_GIT_DIR}/docker/uwsgi.ini:/conf/uwsgi.ini
|
|
- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
|
|
- ${APP_DATABASE_FILE}:/code/db.sqlite3
|
|
- neptune_static:${STATIC_ROOT}
|
|
env_file:
|
|
- stack.env
|
|
volumes_from:
|
|
- tmp
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
migration:
|
|
condition: service_started
|
|
collectstatic:
|
|
condition: service_started
|
|
networks:
|
|
- default
|
|
|
|
scheduling:
|
|
image: pathogen/neptune:latest
|
|
container_name: scheduling_neptune
|
|
build:
|
|
context: .
|
|
args:
|
|
OPERATION: ${OPERATION}
|
|
command: sh -c '. /venv/bin/activate && python manage.py scheduling'
|
|
volumes:
|
|
- ${PORTAINER_GIT_DIR}:/code
|
|
- ${PORTAINER_GIT_DIR}/docker/uwsgi.ini:/conf/uwsgi.ini
|
|
- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
|
|
- ${APP_DATABASE_FILE}:/code/db.sqlite3
|
|
- neptune_static:${STATIC_ROOT}
|
|
env_file:
|
|
- stack.env
|
|
volumes_from:
|
|
- tmp
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
migration:
|
|
condition: service_started
|
|
collectstatic:
|
|
condition: service_started
|
|
networks:
|
|
- default
|
|
- pathogen
|
|
- elastic
|
|
|
|
migration:
|
|
image: pathogen/neptune:latest
|
|
container_name: migration_neptune
|
|
build:
|
|
context: .
|
|
args:
|
|
OPERATION: ${OPERATION}
|
|
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
|
|
- neptune_static:${STATIC_ROOT}
|
|
volumes_from:
|
|
- tmp
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
|
|
collectstatic:
|
|
image: pathogen/neptune:latest
|
|
container_name: collectstatic_neptune
|
|
build:
|
|
context: .
|
|
args:
|
|
OPERATION: ${OPERATION}
|
|
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
|
|
- neptune_static:${STATIC_ROOT}
|
|
volumes_from:
|
|
- tmp
|
|
env_file:
|
|
- stack.env
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
|
|
nginx:
|
|
image: nginx:latest
|
|
container_name: nginx_neptune
|
|
ports:
|
|
- ${APP_PORT}:9999
|
|
ulimits:
|
|
nproc: 65535
|
|
nofile:
|
|
soft: 65535
|
|
hard: 65535
|
|
volumes:
|
|
- ${PORTAINER_GIT_DIR}:/code
|
|
- ${PORTAINER_GIT_DIR}/docker/nginx/conf.d/${OPERATION}.conf:/etc/nginx/conf.d/default.conf
|
|
- neptune_static:${STATIC_ROOT}
|
|
volumes_from:
|
|
- tmp
|
|
networks:
|
|
- default
|
|
- pathogen
|
|
depends_on:
|
|
app:
|
|
condition: service_started
|
|
|
|
tmp:
|
|
image: busybox
|
|
container_name: tmp_neptune
|
|
command: chmod -R 777 /var/run/socks
|
|
volumes:
|
|
- /var/run/socks
|
|
|
|
redis:
|
|
image: redis
|
|
container_name: redis_neptune
|
|
command: redis-server /etc/redis.conf
|
|
ulimits:
|
|
nproc: 65535
|
|
nofile:
|
|
soft: 65535
|
|
hard: 65535
|
|
volumes:
|
|
- ${PORTAINER_GIT_DIR}/docker/redis.conf:/etc/redis.conf
|
|
volumes_from:
|
|
- tmp
|
|
healthcheck:
|
|
test: "redis-cli -s /var/run/socks/redis.sock ping"
|
|
interval: 2s
|
|
timeout: 2s
|
|
retries: 15
|
|
networks:
|
|
- default
|
|
- pathogen
|
|
|
|
networks:
|
|
default:
|
|
driver: bridge
|
|
pathogen:
|
|
external: true
|
|
elastic:
|
|
external: true
|
|
|
|
volumes:
|
|
neptune_static: {} |