Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 0s
- Remove hardcoded values from docker-compose.yml - Use environment variables from .env file instead - Update .env.example with placeholder values and instructions - Update DOCKER_README.md with .env file setup instructions - Fixes WebSocket origin check by allowing PHX_HOST to be configured per environment 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
36 lines
761 B
YAML
36 lines
761 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
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:
|
|
- "${PORT:-4000}:4000"
|
|
environment:
|
|
DATABASE_URL: ${DATABASE_URL}
|
|
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
|
|
PHX_HOST: ${PHX_HOST}
|
|
PORT: ${PORT:-4000}
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./priv/static:/app/priv/static
|
|
|
|
volumes:
|
|
postgres_data:
|