chore: expose the service using caddy proxy
This commit is contained in:
parent
3f40253559
commit
b6a78ef403
@ -16,8 +16,9 @@ services:
|
||||
init: true
|
||||
restart: unless-stopped
|
||||
hostname: slax
|
||||
ports:
|
||||
- '${SLAX_PORT:-34000}:4000'
|
||||
networks:
|
||||
- default
|
||||
- upstream
|
||||
environment:
|
||||
PGUSER: postgres
|
||||
PGPASSWORD: postgres
|
||||
@ -26,6 +27,12 @@ services:
|
||||
- './:/app'
|
||||
- 'slax_build:/app/_build'
|
||||
- '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
|
||||
command: phx.server
|
||||
slax-production:
|
||||
@ -35,10 +42,10 @@ services:
|
||||
init: true
|
||||
restart: unless-stopped
|
||||
hostname: slax-prod-local
|
||||
ports:
|
||||
- '${SLAX_PRODUCTION_PORT:-44000}:4000'
|
||||
networks:
|
||||
- upstream
|
||||
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}'
|
||||
profiles:
|
||||
- production
|
||||
@ -48,3 +55,8 @@ services:
|
||||
volumes:
|
||||
slax_build: {}
|
||||
slax_deps: {}
|
||||
|
||||
networks:
|
||||
upstream:
|
||||
external: true
|
||||
name: proxy_upstream
|
||||
|
Loading…
x
Reference in New Issue
Block a user