a nice production stack on my laptop for my personal velociy system
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
#
|
||||
# Please consult the `Deployment` section in the readme if you want to deploy
|
||||
# this. You *need* to keep this nginx service, even if you have your own,
|
||||
# otherwise the static files will not be served correctly! If you do remove
|
||||
@@ -6,35 +5,35 @@
|
||||
# Also take a look at the "Static files" section in the .env file
|
||||
|
||||
services:
|
||||
web:
|
||||
wger-web:
|
||||
image: wger/server:latest
|
||||
depends_on:
|
||||
db:
|
||||
wger-db:
|
||||
condition: service_healthy
|
||||
cache:
|
||||
wger-cache:
|
||||
condition: service_healthy
|
||||
env_file:
|
||||
- ./config/prod.env
|
||||
#env_file:
|
||||
# - ./config/prod.env
|
||||
volumes:
|
||||
- static:/home/wger/static
|
||||
- wger-static:/home/wger/static
|
||||
expose:
|
||||
- 8000
|
||||
- 2003
|
||||
healthcheck:
|
||||
test: wget --no-verbose --tries=1 --spider http://localhost:2003
|
||||
test: wget --no-verbose --tries=1 --spider http://localhost:8000
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
start_period: 300s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
|
||||
nginx:
|
||||
wger-nginx:
|
||||
image: nginx:stable
|
||||
depends_on:
|
||||
- web
|
||||
- wger-web
|
||||
volumes:
|
||||
- ./config/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
- static:/wger/static:ro
|
||||
- media:/wger/media:ro
|
||||
- wger-static:/wger/static:ro
|
||||
- wger-media:/wger/media:ro
|
||||
ports:
|
||||
- "80:80"
|
||||
healthcheck:
|
||||
@@ -45,14 +44,14 @@ services:
|
||||
start_period: 30s
|
||||
restart: unless-stopped
|
||||
|
||||
db:
|
||||
wger-db:
|
||||
image: postgres:15-alpine
|
||||
environment:
|
||||
- POSTGRES_USER=wger
|
||||
- POSTGRES_PASSWORD=wger
|
||||
- POSTGRES_DB=wger
|
||||
# volumes:
|
||||
# - postgres-data:/var/lib/postgresql/data/
|
||||
volumes:
|
||||
- wger-postgres-data:/var/lib/postgresql/data/
|
||||
expose:
|
||||
- 5432
|
||||
healthcheck:
|
||||
@@ -63,12 +62,12 @@ services:
|
||||
start_period: 30s
|
||||
restart: unless-stopped
|
||||
|
||||
cache:
|
||||
image: redis
|
||||
wger-cache:
|
||||
image: redis:latest
|
||||
expose:
|
||||
- 6379
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
- wger-redis-data:/data
|
||||
healthcheck:
|
||||
test: redis-cli ping
|
||||
interval: 10s
|
||||
@@ -77,15 +76,15 @@ services:
|
||||
start_period: 30s
|
||||
restart: unless-stopped
|
||||
|
||||
celery_worker:
|
||||
wger-celery_worker:
|
||||
image: wger/server:latest
|
||||
command: /start-worker
|
||||
env_file:
|
||||
- ./config/prod.env
|
||||
#env_file:
|
||||
# - ./config/prod.env
|
||||
volumes:
|
||||
- media:/home/wger/media
|
||||
- wger-media:/home/wger/media
|
||||
depends_on:
|
||||
web:
|
||||
wger-web:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: celery -A wger inspect ping
|
||||
@@ -94,24 +93,24 @@ services:
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
|
||||
celery_beat:
|
||||
wger-celery_beat:
|
||||
image: wger/server:latest
|
||||
command: /start-beat
|
||||
volumes:
|
||||
- celery-beat:/home/wger/beat/
|
||||
env_file:
|
||||
- ./config/prod.env
|
||||
- wger-celery-beat:/home/wger/beat/
|
||||
#env_file:
|
||||
# - ./config/prod.env
|
||||
depends_on:
|
||||
celery_worker:
|
||||
wger-celery_worker:
|
||||
condition: service_healthy
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
celery-beat:
|
||||
static:
|
||||
media:
|
||||
redis-data:
|
||||
wger-postgres-data:
|
||||
wger-celery-beat:
|
||||
wger-static:
|
||||
wger-media:
|
||||
wger-redis-data:
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: wger_network
|
||||
name: wger_network
|
Reference in New Issue
Block a user