-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
56 lines (54 loc) · 1.2 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
services:
bun:
build: ./app
restart: unless-stopped
networks:
- app-network
nginx:
build: ./nginx
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- ./nginx/nginx-templates:/nginx-templates:ro
- webroot:/var/www/html
- certbot-etc:/etc/letsencrypt
environment:
- DOMAIN=$DOMAIN
depends_on:
- bun
networks:
- app-network
certbot:
image: certbot/certbot
volumes:
- webroot:/var/www/html
- certbot-etc:/etc/letsencrypt
depends_on:
- nginx
command: certonly -v --webroot --webroot-path=/var/www/html --email $EMAIL --agree-tos --no-eff-email -d $DOMAIN # add --staging for testing
networks:
- app-network
cron:
build: ./cron
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./docker-compose.yml:/app/docker-compose.yml:ro
- ./.env:/app/.env:ro
environment:
- COMPOSE_PROJECT_NAME=$COMPOSE_PROJECT_NAME
depends_on:
- nginx
volumes:
certbot-etc:
webroot:
driver: local
driver_opts:
type: none
device: /var/www/html
o: bind
networks:
app-network:
driver: bridge