Remove variable defaults

These are not set whenever a merged compose file is used
This commit is contained in:
Sonny Bakker 2023-06-27 10:11:07 +02:00
parent 60af3ba4f6
commit 6a46dc01e2
3 changed files with 9 additions and 8 deletions

View file

@ -5,6 +5,8 @@ volumes:
node-modules: node-modules:
services: services:
db:
env_file: ./.development.env
celery: celery:
env_file: ./.development.env env_file: ./.development.env
environment: environment:
@ -15,12 +17,12 @@ services:
django: django:
build: build:
target: development target: development
command: python /app/src/manage.py runserver 0.0.0.0:${DJANGO_PORT:-8000} command: python /app/src/manage.py runserver 0.0.0.0:8000
env_file: ./.development.env env_file: ./.development.env
environment: environment:
- DJANGO_SETTINGS_MODULE=newsreader.conf.docker - DJANGO_SETTINGS_MODULE=newsreader.conf.docker
ports: ports:
- "${DJANGO_PORT:-8000}:${DJANGO_PORT:-8000}" - "${DJANGO_PORT:-8000}:8000"
volumes: volumes:
- ./src:/app/src - ./src:/app/src
- static-files:/app/src/newsreader/static - static-files:/app/src/newsreader/static

View file

@ -9,6 +9,9 @@ services:
depends_on: depends_on:
django: django:
condition: service_healthy condition: service_healthy
ports:
- "${NGINX_HTTP_PORT:-80}:80"
- "${NGINX_HTTPS_PORT:-443}:443"
volumes: volumes:
- ./config/nginx/conf.d:/etc/nginx/conf.d - ./config/nginx/conf.d:/etc/nginx/conf.d
- logs:/var/log/nginx - logs:/var/log/nginx

View file

@ -13,10 +13,6 @@ services:
interval: 5s interval: 5s
timeout: 10s timeout: 10s
retries: 10 retries: 10
environment:
POSTGRES_DB: "${POSTGRES_DB:-newsreader}"
POSTGRES_USER: "${POSTGRES_USER:-newsreader}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-newsreader}"
volumes: volumes:
- postgres-data:/var/lib/postgresql/data - postgres-data:/var/lib/postgresql/data
@ -65,11 +61,11 @@ services:
entrypoint: /app/bin/docker-entrypoint.sh entrypoint: /app/bin/docker-entrypoint.sh
command: | command: |
gunicorn gunicorn
--bind 0.0.0.0:${DJANGO_PORT:-8000} --bind 0.0.0.0:8000
--workers 3 --workers 3
newsreader.wsgi:application newsreader.wsgi:application
healthcheck: healthcheck:
test: /usr/bin/curl --fail http://django:${DJANGO_PORT:-8000} || exit 1 test: /usr/bin/curl --fail http://django:8000 || exit 1
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 10 retries: 10