chore: expose the service using caddy proxy
This commit is contained in:
parent
3f40253559
commit
b6a78ef403
@ -16,8 +16,9 @@ services:
|
|||||||
init: true
|
init: true
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
hostname: slax
|
hostname: slax
|
||||||
ports:
|
networks:
|
||||||
- '${SLAX_PORT:-34000}:4000'
|
- default
|
||||||
|
- upstream
|
||||||
environment:
|
environment:
|
||||||
PGUSER: postgres
|
PGUSER: postgres
|
||||||
PGPASSWORD: postgres
|
PGPASSWORD: postgres
|
||||||
@ -26,6 +27,12 @@ services:
|
|||||||
- './:/app'
|
- './:/app'
|
||||||
- 'slax_build:/app/_build'
|
- 'slax_build:/app/_build'
|
||||||
- 'slax_deps:/app/deps'
|
- 'slax_deps:/app/deps'
|
||||||
|
labels:
|
||||||
|
caddy: ${SLAX_DOMAIN:-slax.dubas.lan}
|
||||||
|
caddy.0_import: base_config
|
||||||
|
caddy.1_import: tls_config
|
||||||
|
caddy.2_reverse_proxy: '{{ upstreams http 4000 }}'
|
||||||
|
caddy.2_reverse_proxy.import: proxy_headers_config
|
||||||
entrypoint: mix
|
entrypoint: mix
|
||||||
command: phx.server
|
command: phx.server
|
||||||
slax-production:
|
slax-production:
|
||||||
@ -35,10 +42,10 @@ services:
|
|||||||
init: true
|
init: true
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
hostname: slax-prod-local
|
hostname: slax-prod-local
|
||||||
ports:
|
networks:
|
||||||
- '${SLAX_PRODUCTION_PORT:-44000}:4000'
|
- upstream
|
||||||
environment:
|
environment:
|
||||||
DATABASE_URL: 'postgresql://postgres:postgres@database:5434/slax'
|
DATABASE_URL: 'postgresql://postgres:postgres@database:5432/slax'
|
||||||
SECRET_KEY_BASE: '${SLAX_PROD_SECRET_KEY_BASE:-LkNDN0Rt87ElBj2FEQGNtsdqCjkBxgOFrxh/I7OYg4ZY8uzAgKtKnRMEHnt+5SSF}'
|
SECRET_KEY_BASE: '${SLAX_PROD_SECRET_KEY_BASE:-LkNDN0Rt87ElBj2FEQGNtsdqCjkBxgOFrxh/I7OYg4ZY8uzAgKtKnRMEHnt+5SSF}'
|
||||||
profiles:
|
profiles:
|
||||||
- production
|
- production
|
||||||
@ -48,3 +55,8 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
slax_build: {}
|
slax_build: {}
|
||||||
slax_deps: {}
|
slax_deps: {}
|
||||||
|
|
||||||
|
networks:
|
||||||
|
upstream:
|
||||||
|
external: true
|
||||||
|
name: proxy_upstream
|
||||||
|
Loading…
x
Reference in New Issue
Block a user