Update caddy files

This commit is contained in:
Andros Fenollosa 2021-04-16 18:35:06 +02:00
parent b0d555b6a6
commit cc2ba9291d
6 changed files with 39 additions and 22 deletions

11
Caddyfile.pro Normal file
View File

@ -0,0 +1,11 @@
https://api.com
root * /usr/src/app/
@notStatic {
not path /static/* /media/*
}
reverse_proxy @notStatic django:8000
file_server

11
Caddyfile.staging Normal file
View File

@ -0,0 +1,11 @@
https://beta.api.com
root * /usr/src/app/
@notStatic {
not path /static/* /media/*
}
reverse_proxy @notStatic django:8000
file_server

View File

@ -51,7 +51,7 @@ services:
- 80:80 - 80:80
- 443:443 - 443:443
volumes: volumes:
- ./Caddyfile:/etc/caddy/Caddyfile - ./Caddyfile.dev:/etc/caddy/Caddyfile
- ./../caddy_data:/data - ./../caddy_data:/data
- .:/usr/src/app/ - .:/usr/src/app/
depends_on: depends_on:

View File

@ -51,7 +51,7 @@ services:
- 443:443 - 443:443
volumes: volumes:
- .:/usr/src/app/ - .:/usr/src/app/
- ./Caddyfile:/etc/caddy/Caddyfile - ./Caddyfile.pro:/etc/caddy/Caddyfile
- ./../caddy_data:/data - ./../caddy_data:/data
depends_on: depends_on:
- django - django

View File

@ -8,35 +8,34 @@ services:
volumes: volumes:
- ./../postgres_data:/var/lib/postgresql/data - ./../postgres_data:/var/lib/postgresql/data
environment: environment:
POSTGRES_DB: kualitte POSTGRES_DB: guitarlions
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
expose: expose:
- 5432 - 5432
django: django:
build: build: .
context: .
dockerfile: ./Dockerfiles/django/Dockerfile
restart: always restart: always
entrypoint: /django-launcher.dev.sh entrypoint: /django-launcher.dev.sh
volumes: volumes:
- .:/usr/src/app/ - .:/usr/src/app/
environment: environment:
DEBUG: "True" DEBUG: "True"
ALLOWED_HOSTS: "beta.neo.kualitteauctions.com" ALLOWED_HOSTS: ""
SECRET_KEY: "mysecret" SECRET_KEY: "secret"
DB_HOST: db DB_HOST: db
DB_NAME: "kualitte" DB_NAME: "guitarlions"
DB_USER: "postgres" DB_USER: "postgres"
DB_PASSWORD: "postgres" DB_PASSWORD: "postgres"
DB_PORT: "5432" DB_PORT: "5432"
DOMAIN: "beta.neo.kualitteauctions.com" DOMAIN: ""
DOMAIN_URL: "https://beta.neo.kualitteauctions.com" DOMAIN_URL: "https://"
STATIC_URL: "/static/" STATIC_URL: "/static/"
MEDIA_URL: "/media/" MEDIA_URL: "/media/"
EMAIL_HOST: "mailhog" EMAIL_USE_TLS: True
EMAIL_USE_TLS: "False" EMAIL_HOST: ""
EMAIL_PORT: "1025" EMAIL_USE_TLS: "True"
EMAIL_PORT: "2525"
EMAIL_USER: "" EMAIL_USER: ""
EMAIL_PASSWORD: "" EMAIL_PASSWORD: ""
expose: expose:
@ -51,21 +50,17 @@ services:
- 80:80 - 80:80
- 443:443 - 443:443
volumes: volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./../caddy_data:/data
- .:/usr/src/app/ - .:/usr/src/app/
- ./Caddyfile.staging:/etc/caddy/Caddyfile
- ./../caddy_data:/data
depends_on: depends_on:
- django - django
gulp: gulp:
build: build: Dockerfiles/gulp
context: .
dockerfile: ./Dockerfiles/gulp/Dockerfile
restart: always restart: always
command: gulp command: gulp
volumes: volumes:
- ./gulpfile.js:/usr/src/app/gulpfile.js - .:/app/
- ./assets:/usr/src/app/assets
- ./static:/usr/src/app/static
depends_on: depends_on:
- caddy - caddy