-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.prod.yml
executable file
·69 lines (65 loc) · 1.91 KB
/
compose.prod.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
57
58
59
60
61
62
63
64
65
66
67
68
69
services:
app:
build: .
restart: unless-stopped
working_dir: /var/www
networks:
- laravelnet
depends_on:
- pgsql
pgsql:
image: postgres:17
restart: unless-stopped
environment:
PGPASSWORD: "${DB_PASSWORD:-secret}"
POSTGRES_DB: "${DB_DATABASE}"
POSTGRES_USER: "${DB_USERNAME}"
POSTGRES_PASSWORD: "${DB_PASSWORD:-secret}"
networks:
- laravelnet
volumes:
- dbdata:/var/lib/postgresql/data
healthcheck:
test:
[
"CMD",
"pg_isready",
"-q",
"-d",
"${DB_DATABASE:-progress_tracker}",
"-U",
"${DB_USERNAME:-progress_user}",
]
retries: 3
timeout: 5s
nginx:
image: nginx
restart: unless-stopped
volumes:
- nginx_logs:/var/log/nginx
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- ./:/var/www
depends_on:
- app
networks:
- laravelnet
- traefik_net
labels:
- "traefik.enable=true"
- "traefik.http.routers.progress-tracker.rule=Host(`progress.stanrunge.dev`)"
- "traefik.http.routers.progress-tracker.entrypoints=web,websecure"
- "traefik.http.routers.progress-tracker.tls.certresolver=myresolver"
- "traefik.http.services.progress-tracker.loadbalancer.server.port=80"
- "traefik.http.middlewares.laravel-headers.headers.customResponseHeaders.X-Frame-Options=SAMEORIGIN"
- "traefik.http.middlewares.laravel-headers.headers.customResponseHeaders.X-Content-Type-Options=nosniff"
- "traefik.http.middlewares.laravel-headers.headers.customResponseHeaders.X-Forwarded-Proto=https"
- "traefik.http.middlewares.laravel-security.headers.stsSeconds=31536000"
- "traefik.http.routers.progress-tracker.middlewares=laravel-headers,laravel-security"
networks:
laravelnet:
driver: bridge
traefik_net:
external: true
volumes:
dbdata:
nginx_logs: