fisk/docker-compose.dev.yml

175 lines
3.8 KiB
YAML
Raw Normal View History

2023-08-10 17:11:40 +00:00
version: "3.8"
name: fisk_dev
2023-07-29 16:34:29 +00:00
services:
2023-08-10 17:11:40 +00:00
app_dev:
image: xf/fisk:dev
container_name: fisk_dev
2023-07-29 16:34:29 +00:00
build:
context: .
args:
OPERATION: ${OPERATION}
volumes:
- ${PORTAINER_GIT_DIR}:/code
- ${PORTAINER_GIT_DIR}/docker/uwsgi.ini:/conf/uwsgi.ini
- ${APP_DATABASE_FILE}:/conf/db.sqlite3
2023-08-10 17:11:40 +00:00
- fisk_static_dev:${STATIC_ROOT}
2023-07-29 16:34:29 +00:00
#ports:
# - "8000:8000" # uwsgi socket
env_file:
- stack.env
volumes_from:
2023-08-10 17:11:40 +00:00
- tmp_dev
2023-07-29 16:34:29 +00:00
depends_on:
# redis:
# condition: service_healthy
2023-08-10 17:11:40 +00:00
migration_dev:
2023-07-29 16:34:29 +00:00
condition: service_started
2023-08-10 17:11:40 +00:00
collectstatic_dev:
2023-07-29 16:34:29 +00:00
condition: service_started
networks:
- default
- xf
- elastic
2023-08-10 17:11:40 +00:00
scheduling_dev:
image: xf/fisk:dev
container_name: scheduling_fisk_dev
2023-07-29 16:34:29 +00:00
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_DATABASE_FILE}:/conf/db.sqlite3
2023-08-10 17:11:40 +00:00
- fisk_static_dev:${STATIC_ROOT}
2023-07-29 16:34:29 +00:00
env_file:
- stack.env
volumes_from:
2023-08-10 17:11:40 +00:00
- tmp_dev
2023-07-29 16:34:29 +00:00
depends_on:
2023-08-10 17:11:40 +00:00
redis_dev:
2023-07-29 16:34:29 +00:00
condition: service_healthy
2023-08-10 17:11:40 +00:00
migration_dev:
2023-07-29 16:34:29 +00:00
condition: service_started
2023-08-10 17:11:40 +00:00
collectstatic_dev:
2023-07-29 16:34:29 +00:00
condition: service_started
networks:
- default
- xf
- elastic
2023-08-10 17:11:40 +00:00
migration_dev:
image: xf/fisk:dev
container_name: migration_fisk_dev
2023-07-29 16:34:29 +00:00
build:
context: .
args:
OPERATION: ${OPERATION}
command: sh -c '. /venv/bin/activate && python manage.py migrate --noinput'
volumes:
- ${PORTAINER_GIT_DIR}:/code
- ${APP_DATABASE_FILE}:/conf/db.sqlite3
2023-08-10 17:11:40 +00:00
- fisk_static_dev:${STATIC_ROOT}
2023-07-29 16:34:29 +00:00
volumes_from:
2023-08-10 17:11:40 +00:00
- tmp_dev
2023-07-29 16:34:29 +00:00
env_file:
- stack.env
2023-08-10 17:11:40 +00:00
collectstatic_dev:
image: xf/fisk:dev
container_name: collectstatic_fisk_dev
2023-07-29 16:34:29 +00:00
build:
context: .
args:
OPERATION: ${OPERATION}
command: sh -c '. /venv/bin/activate && python manage.py collectstatic --noinput'
volumes:
- ${PORTAINER_GIT_DIR}:/code
- ${APP_DATABASE_FILE}:/conf/db.sqlite3
2023-08-10 17:11:40 +00:00
- fisk_static_dev:${STATIC_ROOT}
2023-07-29 16:34:29 +00:00
volumes_from:
2023-08-10 17:11:40 +00:00
- tmp_dev
2023-07-29 16:34:29 +00:00
env_file:
- stack.env
2023-08-10 17:11:40 +00:00
nginx_dev:
2023-07-29 16:34:29 +00:00
image: nginx:latest
2023-08-10 17:11:40 +00:00
container_name: nginx_fisk_dev
2023-07-29 16:34:29 +00:00
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
2023-08-10 17:11:40 +00:00
- fisk_static_dev:${STATIC_ROOT}
2023-07-29 16:34:29 +00:00
volumes_from:
2023-08-10 17:11:40 +00:00
- tmp_dev
2023-07-29 16:34:29 +00:00
networks:
- default
- xf
depends_on:
2023-08-10 17:11:40 +00:00
app_dev:
2023-07-29 16:34:29 +00:00
condition: service_started
# volumes_from:
# - tmp
# depends_on:
# redis:
# condition: service_healthy
2023-08-10 17:11:40 +00:00
tmp_dev:
2023-07-29 16:34:29 +00:00
image: busybox
2023-08-10 17:11:40 +00:00
container_name: tmp_fisk_dev
2023-07-29 16:34:29 +00:00
command: chmod -R 777 /var/run/socks
volumes:
- /var/run/socks
# For caching
2023-08-10 17:11:40 +00:00
redis_dev:
2023-07-29 16:34:29 +00:00
image: redis
2023-08-10 17:11:40 +00:00
container_name: redis_fisk_dev
2023-07-29 16:34:29 +00:00
command: redis-server /etc/redis.conf
ulimits:
nproc: 65535
nofile:
soft: 65535
hard: 65535
volumes:
- ${PORTAINER_GIT_DIR}/docker/redis.conf:/etc/redis.conf
2023-08-10 17:11:40 +00:00
- fisk_redis_data_dev:/data
2023-07-29 16:34:29 +00:00
volumes_from:
2023-08-10 17:11:40 +00:00
- tmp_dev
2023-07-29 16:34:29 +00:00
healthcheck:
test: "redis-cli -s /var/run/socks/redis.sock ping"
interval: 2s
timeout: 2s
retries: 15
# pyroscope:
# image: "pyroscope/pyroscope:latest"
# ports:
# - "4040:4040"
# command:
# - "server"
networks:
default:
driver: bridge
xf:
external: true
elastic:
external: true
volumes:
2023-08-10 17:11:40 +00:00
fisk_static_dev: {}
fisk_redis_data_dev: {}