-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
115 lines (108 loc) · 3.15 KB
/
Copy pathcompose.yaml
File metadata and controls
115 lines (108 loc) · 3.15 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: marine-insight
services:
postgres:
image: postgres:latest
restart: unless-stopped
environment:
POSTGRES_DB: marine_insight
POSTGRES_USER: marine_insight
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
secrets:
- postgres_password
volumes:
- postgres-data:/var/lib/postgresql
- ./backups:/backups
networks:
- data
healthcheck:
test:
["CMD-SHELL", "pg_isready -U marine_insight -d marine_insight"]
interval: 5s
timeout: 5s
retries: 12
migrate:
build:
context: .
dockerfile: Dockerfile
command: ["--migrate"]
environment: &web-environment
ASPNETCORE_ENVIRONMENT: Production
DataProtection__KeyPath: /var/lib/marine-insight/keys
Database__Provider: PostgreSql
ReverseProxy__KnownProxies__0: 172.30.0.10
secrets: &web-secrets
- ConnectionStrings__MarineInsight
depends_on:
postgres:
condition: service_healthy
networks:
- data
restart: "no"
web:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
environment: *web-environment
secrets: *web-secrets
depends_on:
migrate:
condition: service_completed_successfully
networks:
- ingress
- data
volumes:
- data-protection:/var/lib/marine-insight/keys
healthcheck:
test:
[
"CMD",
"curl",
"--fail",
"--silent",
"--show-error",
"http://127.0.0.1:8080/health/live",
]
interval: 15s
timeout: 5s
retries: 6
start_period: 20s
reverse-proxy:
image: caddy:2.10-alpine
restart: unless-stopped
environment:
MARINE_INSIGHT_SITE_ADDRESS: ${MARINE_INSIGHT_SITE_ADDRESS:-http://localhost}
ACME_EMAIL: ${ACME_EMAIL:-}
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- ./deploy/Caddyfile:/etc/caddy/Caddyfile:ro
- caddy-data:/data
- caddy-config:/config
depends_on:
web:
condition: service_healthy
networks:
ingress:
ipv4_address: 172.30.0.10
secrets:
postgres_password:
file: ${MARINE_INSIGHT_POSTGRES_PASSWORD_FILE:-./deploy/secrets/postgres_password.example}
ConnectionStrings__MarineInsight:
file: ${MARINE_INSIGHT_DB_CONNECTION_SECRET_FILE:-./deploy/secrets/ConnectionStrings__MarineInsight.example}
volumes:
postgres-data:
caddy-data:
caddy-config:
data-protection:
networks:
ingress:
driver: bridge
ipam:
config:
- subnet: 172.30.0.0/24
data:
driver: bridge
internal: true