update
This commit is contained in:
parent
8ff2ae26e7
commit
11c4ba3708
@ -10,4 +10,4 @@ else
|
||||
python manage.py collectstatic --noinput
|
||||
fi
|
||||
|
||||
gunicorn "$APP_NAME".wsgi:application --bind 0.0.0.0:"$APP_PORT" --workers 3 --timeout 60 --graceful-timeout 60 --log-level=info
|
||||
gunicorn "$APP_NAME".wsgi:application --bind "$APP_HOST":"$APP_PORT" --workers 3 --timeout 60 --graceful-timeout 60 --log-level=info
|
||||
|
@ -19,7 +19,7 @@ services:
|
||||
- "traefik.http.routers.${APP_NAME}-backend.entrypoints=web-secure"
|
||||
- "traefik.http.services.${APP_NAME}-backend.loadbalancer.server.port=${APP_PORT}"
|
||||
- "traefik.http.routers.${APP_NAME}-backend.tls.certresolver=letsencrypt"
|
||||
env_file: .env.prod
|
||||
env_file: .env
|
||||
# depends_on:
|
||||
# db:
|
||||
# condition: service_healthy
|
||||
@ -31,7 +31,7 @@ services:
|
||||
hostname: "${POSTGRES_HOST:-db}"
|
||||
volumes:
|
||||
- postgres_data_dir:/var/lib/postgresql/data/
|
||||
env_file: .env.prod
|
||||
env_file: .env
|
||||
ports:
|
||||
- "5432:5432"
|
||||
shm_size: 1g
|
||||
@ -52,7 +52,7 @@ services:
|
||||
volumes:
|
||||
- ./src:/usr/src/app/
|
||||
- ./deployment/scripts:/app/deployment/scripts/
|
||||
env_file: .env.prod
|
||||
env_file: .env
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
@ -68,13 +68,13 @@ services:
|
||||
image: traefik:v2.5
|
||||
container_name: "${APP_NAME}-traefik"
|
||||
env_file:
|
||||
- .env.prod
|
||||
- .env
|
||||
command:
|
||||
- "--providers.docker=true"
|
||||
- "--providers.docker.exposedbydefault=false"
|
||||
- "--entrypoints.web.address=:80"
|
||||
- "--entrypoints.web-secure.address=:443"
|
||||
- "--certificatesresolvers.letsencrypt.acme.email=app@dev-test.com"
|
||||
- "--certificatesresolvers.letsencrypt.acme.email=${LETSENCRYPT_EMAIL}"
|
||||
- "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
|
||||
- "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
|
||||
- "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
|
||||
|
12
env.example
12
env.example
@ -1,7 +1,13 @@
|
||||
# Application configuration variables
|
||||
APP_NAME=project_name
|
||||
APP_HOST=app.backend.dev
|
||||
APP_PORT=8000
|
||||
APP_SECRET_KEY='ur secret key'
|
||||
APP_ENV=dev
|
||||
DJANGO_SETTINGS_MODULE=project_name.settings.dev
|
||||
ALLOWED_HOSTS='app.backend.dev'
|
||||
CSRF_TRUSTED_ORIGINS='http://app.backend.dev'
|
||||
CORS_ALLOWED_ORIGINS=['http://app.backend.dev','http://localhost:3000']
|
||||
|
||||
# Postgres configuration variables
|
||||
POSTGRES_USER=postgres
|
||||
@ -10,6 +16,6 @@ POSTGRES_DB=postgres
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_HOST=db
|
||||
|
||||
# Celery configuration variables
|
||||
CELERY_BROKER_URL=redis://redis:6379/0
|
||||
CELERY_RESULT_BACKEND=redis://redis:6379/0
|
||||
|
||||
# Traefik configuration variables
|
||||
LETSENCRYPT_EMAIL=your_email
|
Loading…
x
Reference in New Issue
Block a user