Files
elixir-websocket-testing/docker-compose.yml
2026-02-23 13:00:16 -07:00

83 lines
2.4 KiB
YAML

version: "3.8"
services:
phoenix1:
build:
context: ./backend
dockerfile: Dockerfile
container_name: phoenix1
hostname: phoenix1
environment:
- RELEASE_NODE=backend@phoenix1
- RELEASE_DISTRIBUTION=sname
- RELEASE_COOKIE=super_secret_cookie_change_in_production
- PHX_HOST=localhost
- PHX_SERVER=true
- PORT=4000
- DATABASE_URL=ecto://postgres:postgres@db/backend_dev
- SECRET_KEY_BASE=W8nGKNhNR8vKj6A4VnwN5h5h7RZvkKmZPqxqzLzYxXGQqC6HnKp2Wm8MNqKpQxZv
- CLUSTER_NODES=backend@phoenix1,backend@phoenix2,backend@phoenix3
ports:
- "4001:4000"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:4000/api/health"]
interval: 10s
timeout: 5s
retries: 5
phoenix2:
build:
context: ./backend
dockerfile: Dockerfile
container_name: phoenix2
hostname: phoenix2
environment:
- RELEASE_NODE=backend@phoenix2
- RELEASE_DISTRIBUTION=sname
- RELEASE_COOKIE=super_secret_cookie_change_in_production
- PHX_HOST=localhost
- PHX_SERVER=true
- PORT=4000
- DATABASE_URL=ecto://postgres:postgres@db/backend_dev
- SECRET_KEY_BASE=W8nGKNhNR8vKj6A4VnwN5h5h7RZvkKmZPqxqzLzYxXGQqC6HnKp2Wm8MNqKpQxZv
- CLUSTER_NODES=backend@phoenix1,backend@phoenix2,backend@phoenix3
ports:
- "4002:4000"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:4000/api/health"]
interval: 10s
timeout: 5s
retries: 5
phoenix3:
build:
context: ./backend
dockerfile: Dockerfile
container_name: phoenix3
hostname: phoenix3
environment:
- RELEASE_NODE=backend@phoenix3
- RELEASE_DISTRIBUTION=sname
- RELEASE_COOKIE=super_secret_cookie_change_in_production
- PHX_HOST=localhost
- PHX_SERVER=true
- PORT=4000
- DATABASE_URL=ecto://postgres:postgres@db/backend_dev
- SECRET_KEY_BASE=W8nGKNhNR8vKj6A4VnwN5h5h7RZvkKmZPqxqzLzYxXGQqC6HnKp2Wm8MNqKpQxZv
- CLUSTER_NODES=backend@phoenix1,backend@phoenix2,backend@phoenix3
ports:
- "4003:4000"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:4000/api/health"]
interval: 10s
timeout: 5s
retries: 5
client:
build:
context: ./client
dockerfile: Dockerfile
container_name: client
ports:
- "5173:80"