neptune/docker/docker-compose.prod.yml

76 lines
1.7 KiB
YAML
Raw Normal View History

2022-11-22 21:53:21 +00:00
version: "2.2"
2022-07-29 08:51:19 +00:00
services:
app:
2022-07-29 21:22:22 +00:00
image: pathogen/neptune:latest
2022-11-22 21:53:21 +00:00
container_name: neptune
build: ./docker/prod
2022-07-29 08:51:19 +00:00
volumes:
- ${PORTAINER_GIT_DIR}:/code
- ${PORTAINER_GIT_DIR}/docker/prod/uwsgi.ini:/conf/uwsgi.ini
- ${NEPTUNE_LOCAL_SETTINGS}:/code/app/local_settings.py
2022-07-29 21:22:22 +00:00
- ${NEPTUNE_DATABASE_FILE}:/code/db.sqlite3
2022-07-29 08:51:19 +00:00
ports:
- "${NEPTUNE_PORT}:8000" # uwsgi socket
2022-07-29 08:51:19 +00:00
env_file:
- ../stack.env
volumes_from:
- tmp
2022-08-16 18:46:13 +00:00
depends_on:
redis:
condition: service_healthy
migration:
condition: service_started
2022-11-22 21:53:21 +00:00
networks:
- default
- pathogen
- elastic
2022-08-16 18:43:55 +00:00
migration:
image: pathogen/neptune:latest
2022-11-22 21:53:21 +00:00
container_name: migration_neptune
2022-09-06 11:11:51 +00:00
build: ./docker/prod
2022-08-16 18:43:55 +00:00
command: sh -c '. /venv/bin/activate && python manage.py migrate --noinput'
volumes:
- ${PORTAINER_GIT_DIR}:/code
- ${NEPTUNE_LOCAL_SETTINGS}:/code/app/local_settings.py
- ${NEPTUNE_DATABASE_FILE}:/code/db.sqlite3
volumes_from:
- tmp
depends_on:
redis:
condition: service_healthy
tmp:
image: busybox
2022-11-22 21:53:21 +00:00
container_name: tmp_neptune
command: chmod -R 777 /var/run/socks
volumes:
2022-11-22 21:53:21 +00:00
- /var/run/socks
redis:
image: redis
2022-11-22 21:53:21 +00:00
container_name: redis_neptune
command: redis-server /etc/redis.conf
2022-11-22 21:53:21 +00:00
ulimits:
nproc: 65535
nofile:
soft: 65535
hard: 65535
volumes:
- ${PORTAINER_GIT_DIR}/docker/redis.conf:/etc/redis.conf
volumes_from:
- tmp
healthcheck:
2022-11-22 21:53:21 +00:00
test: "redis-cli -s /var/run/socks/redis.sock ping"
interval: 2s
timeout: 2s
retries: 15
2022-07-29 08:51:19 +00:00
networks:
2022-11-22 21:53:21 +00:00
default:
driver: bridge
pathogen:
external: true
elastic:
external: true