-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-prod.yaml
92 lines (90 loc) · 2.17 KB
/
docker-compose-prod.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
version: "3.9"
services:
rabbitmq:
image: rabbitmq:3.8.13-alpine
container_name: rabbitmq
hostname: rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
networks:
- backend
expose:
- 5672
restart: unless-stopped
publisher:
build:
context: ./backend
dockerfile: $PWD/backend/publisher/dockerfile
image: publisher:v3.0
container_name: publisher
environment:
- RABBITMQ_CONNECTION_URI=${RABBITMQ_CONNECTION_URI}
- PUBLISHER_SERVICEID=${PUBLISHER_SERVICEID}
networks:
- backend
depends_on:
- rabbitmq
restart: unless-stopped
consumer:
build:
context: ./backend
dockerfile: $PWD/backend/consumer/dockerfile
image: consumer:v3.0
container_name: consumer
environment:
- CONSUMER_PUBLIC_VAPIDKEY=${CONSUMER_PUBLIC_VAPIDKEY}
- CONSUMER_PRIVATE_VAPIDKEY=${CONSUMER_PRIVATE_VAPIDKEY}
- CONSUMER_CONTACT_EMAIL=${CONSUMER_CONTACT_EMAIL}
- RABBITMQ_CONNECTION_URI=${RABBITMQ_CONNECTION_URI}
- MONGODB_CONNECTION_URI=${MONGODB_CONNECTION_URI}
networks:
- backend
depends_on:
- rabbitmq
restart: unless-stopped
PS2AlertMe:
build:
context: .
dockerfile: dockerfile
image: ps2alertme:v3.0
container_name: PS2AlertMe
environment:
- MONGODB_CONNECTION_URI=${MONGODB_CONNECTION_URI}
- COOKIE_SECRET=${COOKIE_SECRET}
- NODE_ENV=production
networks:
- backend
expose:
- 8080
restart: unless-stopped
caddy:
build:
context: .
dockerfile: $PWD/caddy/dockerfile
image: caddy:ps2alertme
container_name: caddy
environment:
- SITE_ADDRESS=${SITE_ADDRESS}
- EMAIL=${EMAIL}
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
networks:
- frontend
- backend
ports:
- 80:80
- 443:443
volumes:
- caddy-data:/data
- ./caddy/Caddyfile:/etc/caddy/Caddyfile
depends_on:
- rabbitmq
- publisher
- consumer
- PS2AlertMe
restart: always
networks:
backend:
frontend:
volumes:
caddy-data: