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
|
target: builder
|
||||||
args:
|
args:
|
||||||
BUILD_MIX_ENV: dev
|
BUILD_MIX_ENV: dev
|
||||||
|
pull_policy: never
|
||||||
init: true
|
init: true
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
hostname: slax
|
hostname: slax
|
||||||
@ -39,14 +40,27 @@ services:
|
|||||||
image: 'joaodubas/slax:${SLAX_PROD_TAG:-prod}'
|
image: 'joaodubas/slax:${SLAX_PROD_TAG:-prod}'
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
pull_policy: never
|
||||||
init: true
|
init: true
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
hostname: slax-prod-local
|
hostname: slax-prod-local
|
||||||
networks:
|
networks:
|
||||||
|
- default
|
||||||
- upstream
|
- upstream
|
||||||
|
develop:
|
||||||
|
watch:
|
||||||
|
- path: .
|
||||||
|
action: rebuild
|
||||||
|
scale: 2
|
||||||
environment:
|
environment:
|
||||||
DATABASE_URL: 'postgresql://postgres:postgres@database:5432/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}'
|
||||||
|
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:
|
profiles:
|
||||||
- production
|
- production
|
||||||
entrypoint: sleep
|
entrypoint: sleep
|
||||||
|
Loading…
x
Reference in New Issue
Block a user