network mode host

This commit is contained in:
Maxi Quoß
2021-09-20 20:40:46 +02:00
parent 8248539412
commit f92d4f74cf
2 changed files with 7 additions and 5 deletions

View File

@@ -73,7 +73,7 @@ TEMPLATES = [
WSGI_APPLICATION = 'django_wol.wsgi.application'
ASGI_APPLICATION = 'django_wol.asgi.application'
CELERY_BROKER_URL = "redis://wol_redis:6379"
CELERY_BROKER_URL = "redis://localhost:6379"
# Database
@@ -85,7 +85,7 @@ DATABASES = {
"NAME": os.getenv("POSTGRES_DB", "wol"),
"USER": os.getenv("POSTGRES_USER", "wol"),
"PASSWORD": os.getenv("POSTGRES_PASSWORD", "wol"),
"HOST": "wol_postgres",
"HOST": "localhost",
"PORT": 5432,
"OPTIONS": {"connect_timeout": 5},
}
@@ -97,7 +97,7 @@ CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels_redis.core.RedisChannelLayer",
"CONFIG": {
"hosts": [("wol_redis", 6379)]
"hosts": [("localhost", 6379)]
}
}
}

View File

@@ -3,8 +3,7 @@ services:
wol_django:
container_name: wol_django
image: seriousm4x/django-wol:latest
ports:
- 8000:8000
network_mode: host
depends_on:
- wol_redis
- wol_postgres
@@ -16,14 +15,17 @@ services:
- DJANGO_DEBUG=False
- DJANGO_LANGUAGE_CODE=de
- DJANGO_TIME_ZONE=Europe/Berlin
- DJANGO_PORT=8000
wol_redis:
container_name: wol_redis
image: redis:6
network_mode: host
restart: always
wol_postgres:
container_name: wol_postgres
image: postgres:13-alpine
restart: always
network_mode: host
environment:
- "POSTGRES_USER=wol"
- "POSTGRES_PASSWORD=wol"