-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
59 lines (56 loc) · 1.23 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
version: '3'
# 3 instances of the same service
services:
bun-chat-1:
build:
context: .
dockerfile: Dockerfile
ports:
- "3001:3001"
environment:
- PORT=3001
- CORS_ORIGIN=${CORS_ORIGIN}
- API_KEY=${API_KEY}
- DATABASE_URL=${DATABASE_URL}
- REDIS_REST_URL=${REDIS_REST_URL}
bun-chat-2:
build:
context: .
dockerfile: Dockerfile
ports:
- "4000:4000"
environment:
- PORT=4000
- CORS_ORIGIN=${CORS_ORIGIN}
- API_KEY=${API_KEY}
- DATABASE_URL=${DATABASE_URL}
- REDIS_REST_URL=${REDIS_REST_URL}
bun-chat-3:
build:
context: .
dockerfile: Dockerfile
ports:
- "5001:5001"
environment:
- PORT=5001
- CORS_ORIGIN=${CORS_ORIGIN}
- API_KEY=${API_KEY}
- DATABASE_URL=${DATABASE_URL}
- REDIS_REST_URL=${REDIS_REST_URL}
# Start load balancer
caddy:
image: caddy/caddy:2.7.3-alpine
container_name: caddy-server
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- $PWD/Caddyfile:/etc/caddy/Caddyfile
- $PWD/site:/serv
- caddy_data:/data
- caddy_config:/config
# Volumes for caddy
volumes:
caddy_data:
caddy_config: