-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (60 loc) · 1.5 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
61
62
63
64
65
66
67
volumes:
w3: # Public assets to be served by Nginx
certs: # Certbot outputs SSL cerfiticates
acme: # Where certbot execs the ACME challenge
services:
# -----------------------------------------
# webserver
# -----------------------------------------
nginx:
build: ./nginx
restart: always
volumes:
- certs:/etc/nginx/ssl:ro
- w3:/usr/share/nginx/html/:ro
- acme:/var/www/acme:ro
ports:
- '80:80'
- '443:443'
profiles:
- web
- certs
# -----------------------------------------
# Let's Encrypt
# -----------------------------------------
certbot:
image: certbot/certbot
depends_on:
- nginx
restart: no # run & exit
volumes:
- certs:/etc/letsencrypt:rw
- acme:/var/www/html:rw
command: >
certonly
-d "keyli3e.com"
-d "www.keyli3e.com"
--webroot -w /var/www/html
-m "$CERT_EMAIL"
--non-interactive
--agree-tos
profiles:
- certs
# -----------------------------------------
# w3-build
# SSH_KEY_KLCOM: path to the ssh key with
# access to the repository
# -----------------------------------------
w3-build:
build:
context: [email protected]:tnlx/klcom.git#main
ssh:
- default=$SSH_KEY_KLCOM
args:
BUILDKIT_CONTEXT_KEEP_GIT_DIR: 1
restart: no # run & exit
volumes:
- w3:/html:rw
profiles:
- web
- build