mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-11-29 13:14:12 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a3b959176 | |||
| 4aebc5fb1f |
@@ -73,7 +73,7 @@ TEMPLATES = [
|
||||
|
||||
WSGI_APPLICATION = 'django_wol.wsgi.application'
|
||||
ASGI_APPLICATION = 'django_wol.asgi.application'
|
||||
CELERY_BROKER_URL = "redis://127.0.0.1:6379"
|
||||
CELERY_BROKER_URL = f"redis://{os.getenv('REDIS_HOST', '127.0.0.1')}:{os.getenv('REDIS_PORT', 6379)}"
|
||||
|
||||
|
||||
# Database
|
||||
@@ -85,8 +85,8 @@ DATABASES = {
|
||||
"NAME": os.getenv("POSTGRES_DB", "upsnap"),
|
||||
"USER": os.getenv("POSTGRES_USER", "upsnap"),
|
||||
"PASSWORD": os.getenv("POSTGRES_PASSWORD", "upsnap"),
|
||||
"HOST": "127.0.0.1",
|
||||
"PORT": 5432,
|
||||
"HOST": os.getenv("POSTGRES_HOST", "127.0.0.1"),
|
||||
"PORT": os.getenv("POSTGRES_PORT", 5432),
|
||||
"OPTIONS": {"connect_timeout": 5},
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,7 @@ CHANNEL_LAYERS = {
|
||||
"default": {
|
||||
"BACKEND": "channels_redis.core.RedisChannelLayer",
|
||||
"CONFIG": {
|
||||
"hosts": [("127.0.0.1", 6379)]
|
||||
"hosts": [(os.getenv("REDIS_HOST", "127.0.0.1"), os.getenv("REDIS_PORT", 6379))]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -142,4 +142,4 @@ STATIC_URL = '/static/'
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
|
||||
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
|
||||
|
||||
VERSION = "v1.1.1"
|
||||
VERSION = "v1.1.2"
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
# wait for db and redis
|
||||
/usr/bin/env bash ./wait-for-it.sh 127.0.0.1:5432 -t 300 -s
|
||||
/usr/bin/env bash ./wait-for-it.sh 127.0.0.1:6379 -t 300 -s
|
||||
/usr/bin/env bash ./wait-for-it.sh "${POSTGRES_HOST}":"${POSTGRES_PORT}" -t 300 -s
|
||||
/usr/bin/env bash ./wait-for-it.sh "${REDIS_HOST}":"${REDIS_PORT}" -t 300 -s
|
||||
|
||||
python manage.py makemigrations
|
||||
python manage.py migrate
|
||||
|
||||
+9
-3
@@ -13,9 +13,13 @@ services:
|
||||
- DJANGO_LANGUAGE_CODE=de
|
||||
- DJANGO_TIME_ZONE=Europe/Berlin
|
||||
- DJANGO_PORT=8000
|
||||
- REDIS_HOST=127.0.0.1
|
||||
- REDIS_PORT=6379
|
||||
- POSTGRES_HOST=127.0.0.1
|
||||
- POSTGRES_PORT=5432
|
||||
- POSTGRES_DB=upsnap
|
||||
- POSTGRES_USER=upsnap
|
||||
- POSTGRES_PASSWORD=upsnap
|
||||
- POSTGRES_DB=upsnap
|
||||
- PING_INTERVAL=5
|
||||
- ENABLE_NOTIFICATIONS=True
|
||||
depends_on:
|
||||
@@ -24,7 +28,8 @@ services:
|
||||
upsnap_redis:
|
||||
container_name: upsnap_redis
|
||||
image: redis:6
|
||||
network_mode: host
|
||||
ports:
|
||||
- "6379:6379"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: redis-cli ping
|
||||
@@ -32,7 +37,8 @@ services:
|
||||
upsnap_postgres:
|
||||
container_name: upsnap_postgres
|
||||
image: postgres:14-alpine
|
||||
network_mode: host
|
||||
ports:
|
||||
- "5432:5432"
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- "POSTGRES_USER=upsnap"
|
||||
|
||||
Reference in New Issue
Block a user