51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
---
|
|
name: '${SLAX_NAME:-slax}'
|
|
|
|
include:
|
|
- path: priv/docker/services/database/docker-compose.yml
|
|
- path: priv/docker/services/otel/docker-compose.yml
|
|
|
|
services:
|
|
slax:
|
|
image: 'joaodubas/slax:${SLAX_TAG:-dev}'
|
|
build:
|
|
context: .
|
|
target: builder
|
|
args:
|
|
BUILD_MIX_ENV: dev
|
|
init: true
|
|
restart: unless-stopped
|
|
hostname: slax
|
|
ports:
|
|
- '${SLAX_PORT:-34000}:4000'
|
|
environment:
|
|
PGUSER: postgres
|
|
PGPASSWORD: postgres
|
|
PGHOST: database
|
|
volumes:
|
|
- './:/app'
|
|
- 'slax_build:/app/_build'
|
|
- 'slax_deps:/app/deps'
|
|
entrypoint: mix
|
|
command: phx.server
|
|
slax-production:
|
|
image: 'joaodubas/slax:${SLAX_PROD_TAG:-prod}'
|
|
build:
|
|
context: .
|
|
init: true
|
|
restart: unless-stopped
|
|
hostname: slax-prod-local
|
|
ports:
|
|
- '${SLAX_PRODUCTION_PORT:-44000}:4000'
|
|
environment:
|
|
DATABASE_URL: 'postgresql://postgres:postgres@database:5434/slax'
|
|
SECRET_KEY_BASE: '${SLAX_PROD_SECRET_KEY_BASE:-LkNDN0Rt87ElBj2FEQGNtsdqCjkBxgOFrxh/I7OYg4ZY8uzAgKtKnRMEHnt+5SSF}'
|
|
profiles:
|
|
- production
|
|
entrypoint: sleep
|
|
command: infinity
|
|
|
|
volumes:
|
|
slax_build: {}
|
|
slax_deps: {}
|