Skip to content

Commit 03cf6e8

Browse files
committed
fix
1 parent 7819beb commit 03cf6e8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docker-compose-prod.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
services:
22
api:
3+
restart: "no" # Ensures that Docker doesn't automatically restart after failure
34
build:
45
context: ./
56
dockerfile: Dockerfile
7+
volumes:
8+
- .:/build
69
ports:
710
- "8000:8000"
811
env_file:
912
- .env
10-
command: ./main
13+
command: air ./main.go -b 0.0.0.0
1114
healthcheck:
12-
test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/general/site-detail"]
15+
test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/general/site-detail"] # Health check endpoint
1316
interval: 30s
1417
retries: 3
1518
start_period: 10s
@@ -32,4 +35,4 @@ services:
3235

3336
networks:
3437
shared_network:
35-
driver: bridge
38+
driver: bridge

0 commit comments

Comments
 (0)