chore(services): improve configuration for local and production
* Set `pull_policy` * On production: * Enable `watch` rebuild * Set for 2 hosts * Expose on `caddy`
This commit is contained in:
parent
bda89b0b01
commit
7610fe097f
@ -13,6 +13,7 @@ services:
|
||||
target: builder
|
||||
args:
|
||||
BUILD_MIX_ENV: dev
|
||||
pull_policy: never
|
||||
init: true
|
||||
restart: unless-stopped
|
||||
hostname: slax
|
||||
@ -39,14 +40,27 @@ services:
|
||||
image: 'joaodubas/slax:${SLAX_PROD_TAG:-prod}'
|
||||
build:
|
||||
context: .
|
||||
pull_policy: never
|
||||
init: true
|
||||
restart: unless-stopped
|
||||
hostname: slax-prod-local
|
||||
networks:
|
||||
- default
|
||||
- upstream
|
||||
develop:
|
||||
watch:
|
||||
- path: .
|
||||
action: rebuild
|
||||
scale: 2
|
||||
environment:
|
||||
DATABASE_URL: 'postgresql://postgres:postgres@database:5432/slax'
|
||||
SECRET_KEY_BASE: '${SLAX_PROD_SECRET_KEY_BASE:-LkNDN0Rt87ElBj2FEQGNtsdqCjkBxgOFrxh/I7OYg4ZY8uzAgKtKnRMEHnt+5SSF}'
|
||||
labels:
|
||||
caddy: ${SLAX_DOMAIN:-slax-prod.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
|
||||
profiles:
|
||||
- production
|
||||
entrypoint: sleep
|
||||
|
Loading…
x
Reference in New Issue
Block a user