-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (64 loc) · 1.49 KB
/
docker-compose.yml
File metadata and controls
68 lines (64 loc) · 1.49 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
services:
# Go Fiber Application
app:
build:
context: .
dockerfile: Dockerfile.dev
container_name: website-app
env_file:
- .env
environment:
- POSTGRES_HOST=postgres
ports:
- "${PORT:-8080}:8080"
volumes:
- .:/app
- /app/tmp
networks:
- website_network
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: website-postgres
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
env_file:
- .env
ports:
- "${POSTGRES_PORT}:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- website_network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
# Mailhog for email testing
mailhog:
image: mailhog/mailhog:latest
container_name: website-mailhog
ports:
- "${MAILHOG_SMTP_PORT:-1025}:1025" # SMTP port
- "${MAILHOG_UI_PORT:-8025}:8025" # Web UI port
networks:
- website_network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8025"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres-data:
driver: local
networks:
website_network:
driver: bridge
name: website_network