-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
60 lines (54 loc) · 1.17 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
58
59
60
version: "3.9"
services:
server:
image: ritesports/nginx-server:main
ports:
- "80:80"
- "443:443"
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
depends_on:
- app
- api
certbot:
image: certbot/certbot
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
entrypoint: ["/bin/sh", "-c", "trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;"]
app:
image: ritesports/next-app:main
environment:
- NODE_ENV=production
depends_on:
- api
api:
image: ritesports/fastify-api:main
environment:
- NODE_ENV=production
# - MONGO_USERNAME=
# - MONGO_PASSWORD=
- MONGO_HOST=db
# - MONGO_PORT=
# - MONGO_DEFAULT_AUTH_DB=
# - MONGO_OPTIONS
secrets:
- cookie_private
- jwt_public
- jwt_private
depends_on:
- db
db:
image: mongo
restart: always
volumes:
- ./mongo-db:/data/db
secrets:
# api
cookie_private:
file: ./cookie_private.pem
jwt_public:
file: ./jwt_public.pem
jwt_private:
file: ./jwt_private.pem