Reverse proxy sample
This commit is contained in:
@@ -27,6 +27,10 @@ DEBUG = (os.environ.get('DJANGO_DEBUG') == "True")
|
||||
|
||||
ALLOWED_HOSTS = os.environ.get('DJANGO_ALLOWED_HOSTS', "*").split(",")
|
||||
|
||||
CSRF_TRUSTED_ORIGINS = os.environ.get('DJANGO_ALLOWED_ORIGINS', "*").split(",")
|
||||
#CSRF_TRUSTED_ORIGINS = ["https://fetcher.matitos.org"]
|
||||
#CSRF_ALLOWED_ORIGINS = ["https://fetcher.matitos.org"]
|
||||
#CORS_ORIGINS_WHITELIST = ["https://fetcher.matitos.org"]
|
||||
|
||||
# Application definition
|
||||
|
||||
|
||||
@@ -31,12 +31,13 @@ services:
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
# Initialization
|
||||
- INITIALIZE_DB=${INITIALIZE_DB:-false} # Related to DB persistence
|
||||
- INITIALIZE_DB=${INITIALIZE_DB:-true} # Related to DB persistence
|
||||
- DJANGO_SUPERUSER_USERNAME=${DJANGO_SUPERUSER_USERNAME:-matitos}
|
||||
- DJANGO_SUPERUSER_PASSWORD=${DJANGO_SUPERUSER_PASSWORD:-matitos}
|
||||
- DJANGO_SUPERUSER_EMAIL=${DJANGO_SUPERUSER_EMAIL:-matitos@matitos.org}
|
||||
# Django
|
||||
- DJANGO_ALLOWED_HOSTS=${DJANGO_ALLOWED_HOSTS:-*} # host1,host2
|
||||
- DJANGO_ALLOWED_ORIGINS=${ALLOWED_ORIGINS:-https://fetcher.matitos.org} # Reverse proxy
|
||||
- DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY:-abc123456789qwerty}
|
||||
- DJANGO_DEBUG=${DJANGO_DEBUG:-False}
|
||||
- PATH_LOGS_DIRECTORY=${PATH_LOGS_DIRECTORY:-/opt/logs}
|
||||
@@ -59,11 +60,11 @@ services:
|
||||
- SELENIUM_ENDPOINT=${SELENIUM_ENDPOINT:-http://fetcher_app_selenium:80}
|
||||
- ENDPOINT_OLLAMA=${ENDPOINT_OLLAMA:-https://ollamamodel.matitos.org}
|
||||
########################
|
||||
volumes: # Dev mode
|
||||
- ./app_urls:/opt/app
|
||||
#volumes: # Development mode
|
||||
# - ./app_urls:/opt/app
|
||||
########################
|
||||
ports:
|
||||
- 8000:8000
|
||||
- 8000 # :8000
|
||||
depends_on:
|
||||
- fetcher_db
|
||||
- fetcher_redis
|
||||
@@ -75,6 +76,14 @@ services:
|
||||
limits:
|
||||
cpus: '4'
|
||||
memory: 4G
|
||||
labels: # Reverse proxy sample
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.fetcher.rule=Host(`fetcher.matitos.org`)"
|
||||
- "traefik.http.routers.fetcher.entrypoints=websecure"
|
||||
- "traefik.http.routers.fetcher.tls.certresolver=myresolvercd"
|
||||
networks:
|
||||
- default # This network
|
||||
- docker_default # Reverse proxy network
|
||||
|
||||
fetcher_db:
|
||||
image: postgres:17
|
||||
@@ -99,12 +108,6 @@ services:
|
||||
ports:
|
||||
- 6379 #:6379
|
||||
|
||||
#fetcher_dozzle:
|
||||
# container_name: fetcher_dozzle
|
||||
# image: amir20/dozzle:latest
|
||||
# volumes:
|
||||
# - /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
# ports:
|
||||
# - 8888:8080
|
||||
# environment:
|
||||
# - DOZZLE_FILTER="name=fetcher_"
|
||||
networks:
|
||||
docker_default:
|
||||
external: true
|
||||
|
||||
Reference in New Issue
Block a user