-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
79 lines (76 loc) · 1.81 KB
/
docker-compose.yml
File metadata and controls
79 lines (76 loc) · 1.81 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
services:
# Default: Single container with SQLite (includes auth)
porter:
build: .
image: porter:latest
container_name: porter
restart: unless-stopped
ports:
- "8069:8069"
volumes:
- porter-data:/app/data
- ~/.ssh:/home/porter/.ssh:ro
environment:
- PORT=8069
- USE_SQLITE=true
- TZ=UTC
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8069/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Optional: Porter with MySQL (enables authentication)
porter-mysql:
build: .
image: porter:latest
container_name: porter-mysql
restart: unless-stopped
ports:
- "8069:8069"
volumes:
- porter-mysql-data:/app/data
- ~/.ssh:/home/porter/.ssh:ro
environment:
- PORT=8069
- USE_MYSQL=true
- DB_HOST=mysql
- DB_PORT=3306
- DB_USER=porter
- DB_PASSWORD=porter_secret
- DB_NAME=porter
- TZ=UTC
depends_on:
mysql:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8069/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
profiles:
- mysql
mysql:
image: mysql:8.0
container_name: porter-mysql-db
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=root_secret
- MYSQL_DATABASE=porter
- MYSQL_USER=porter
- MYSQL_PASSWORD=porter_secret
volumes:
- mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
profiles:
- mysql
volumes:
porter-data:
porter-mysql-data:
mysql-data: