-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.dev.yaml
53 lines (47 loc) · 1.46 KB
/
docker-compose.dev.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
# https://github.com/wmnnd/nginx-certbot
# https://scribe.rip/@pentacent/nginx-and-lets-encrypt-with-docker-in-less-than-5-minutes-b4b8a60d3a71
services:
nginx:
container_name: nginx
image: nginx:1.25.1-alpine
# image: nginx:dev
# build:
# context: nginx.dev
# dockerfile: nginx.dockerfile
restart: unless-stopped
ports:
- 80:80
- 443:443
environment:
- TZ=Asia/Seoul
volumes:
- ./nginx.dev/nginx.conf:/etc/nginx/nginx.conf
- ./nginx.dev/conf.d:/etc/nginx/conf.d
- ./nginx.dev/certbot/conf:/etc/letsencrypt
- ./nginx.dev/certbot/www:/var/www/certbot
- ./logs/nginx:/var/log/nginx/
# command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx'"
certbot:
image: certbot/dns-route53
restart: unless-stopped
volumes:
- ./nginx.dev/certbot/conf:/etc/letsencrypt
- ./nginx.dev/certbot/www:/var/www/certbot
- ./logs/certbot:/var/log/letsencrypt
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
env_file:
- .env.certbot
backend:
container_name: backend
image: backend:dev
build:
context: .
restart: on-failure
entrypoint: ["./node_modules/.bin/vite-node", "src/server.ts"]
volumes:
- ./backend/src:/app/backend/src
- ./logs/backend:/app/backend/logs
env_file: .env.https
environment:
- MODE=https
- TZ=Asia/Seoul