-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (57 loc) · 1.3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
60 lines (57 loc) · 1.3 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
version: '3'
services:
api:
build:
context: .
volumes:
- ./certificates:/var/lib/lxdhub/certificates
- ./lxdhub.yml:/var/lib/lxdhub/lxdhub.yml
ports:
- "3000:3000"
environment:
- PORT=3000
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=lxdhub
- POSTGRES_PASSWORD=lxdhub
- POSTGRES_DATABASE=lxdhub
- LXD_CRT=certificates/client.crt
- LXD_KEY=certificates/client.key
- SYNC_INTERVAL=30
command: ["start", "api", "ui"]
depends_on:
- db
links:
- db:postgres
dbsync:
build:
context: .
volumes:
- ./certificates:/var/lib/lxdhub/certificates
- ./lxdhub.yml:/var/lib/lxdhub/lxdhub.yml
environment:
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=lxdhub
- POSTGRES_PASSWORD=lxdhub
- POSTGRES_DATABASE=lxdhub
- LOG_LEVEL=silly
- SYNC_INTERVAL=30
- LXDHUB_CONFIG=./lxdhub.yml
depends_on:
- db
links:
- db:postgres
command: ["start", "dbsync"]
db:
image: postgres:10.2
environment:
POSTGRES_USER: lxdhub
POSTGRES_DB: lxdhub
POSTGRES_PASSWORD: lxdhub
volumes:
- db:/var/lib/postgresql/data
ports:
- "127.0.0.1:5432:5432"
volumes:
db: