37 lines
832 B
YAML
37 lines
832 B
YAML
|
|
version: '3.8'
|
||
|
|
|
||
|
|
services:
|
||
|
|
db:
|
||
|
|
image: postgres:16-alpine
|
||
|
|
environment:
|
||
|
|
POSTGRES_USER: postgres
|
||
|
|
POSTGRES_PASSWORD: postgres
|
||
|
|
POSTGRES_DB: my_first_elixir_vibe_code_dev
|
||
|
|
ports:
|
||
|
|
- "5432:5432"
|
||
|
|
volumes:
|
||
|
|
- postgres_data:/var/lib/postgresql/data
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||
|
|
interval: 5s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 5
|
||
|
|
|
||
|
|
web:
|
||
|
|
build: .
|
||
|
|
ports:
|
||
|
|
- "4000:4000"
|
||
|
|
environment:
|
||
|
|
DATABASE_URL: "ecto://postgres:postgres@db/my_first_elixir_vibe_code_dev"
|
||
|
|
SECRET_KEY_BASE: "PNosxXTGA8DhjwcE5QWJkJZr400AFXjIWu27dEFQg/QJE3RyCna6HePec1Sjgz6W"
|
||
|
|
PHX_HOST: "localhost"
|
||
|
|
PORT: "4000"
|
||
|
|
depends_on:
|
||
|
|
db:
|
||
|
|
condition: service_healthy
|
||
|
|
volumes:
|
||
|
|
- ./priv/static:/app/priv/static
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
postgres_data:
|