-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (48 loc) · 1.29 KB
/
docker-compose.yml
File metadata and controls
54 lines (48 loc) · 1.29 KB
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
version: '3.8'
services:
deployhub:
build: .
container_name: deployhub
restart: unless-stopped
ports:
- "3001:3001"
environment:
- NODE_ENV=production
- PORT=3001
- JWT_SECRET=${JWT_SECRET:-f564ed172ea84245bab290cccc30816a9ad7e84896c2124f7d990ab88272b4f1}
volumes:
# Persist SQLite database
- deployhub_data:/app/data
# Mount Docker socket for building/deploying user projects
- /var/run/docker.sock:/var/run/docker.sock
networks:
- deployhub-network
# Nginx reverse proxy with SSL
nginx:
image: nginx:alpine
container_name: deployhub-nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./certbot/www:/var/www/certbot:ro
- ./certbot/conf:/etc/letsencrypt:ro
depends_on:
- deployhub
networks:
- deployhub-network
# Certbot for SSL certificates
certbot:
image: certbot/certbot
container_name: deployhub-certbot
volumes:
- ./certbot/www:/var/www/certbot
- ./certbot/conf:/etc/letsencrypt
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
deployhub_data:
networks:
deployhub-network:
driver: bridge