working ha
This commit is contained in:
82
docker-compose.yml
Normal file
82
docker-compose.yml
Normal file
@@ -0,0 +1,82 @@
|
||||
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"
|
||||
Reference in New Issue
Block a user