-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (48 loc) · 1.32 KB
/
docker-compose.yml
File metadata and controls
52 lines (48 loc) · 1.32 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
services:
api:
image: ilovecrayons/uwb:latest
container_name: express-app
expose:
- "80" # Only expose internally
env_file: .env
environment:
- NODE_ENV=production
- PORT=80 # Explicitly set the port to 80
restart: unless-stopped
networks:
- app-network
volumes:
- ./logs:/app/logs
# Add healthcheck to ensure the API is actually running
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:80/api/"]
interval: 30s
timeout: 10s
retries: 3
nginx:
image: nginx:1.25
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
depends_on:
- api
restart: always
networks:
- app-network
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
command: certonly --webroot --webroot-path=/var/www/certbot --email huangfeiyang2008@gmail.com --agree-tos --no-eff-email --force-renewal -d sigmasociety.dedyn.io
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h; done;'"
restart: always
networks:
app-network:
driver: bridge