forked from ferriskey/ferriskey
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
118 lines (112 loc) · 2.5 KB
/
docker-compose.yaml
File metadata and controls
118 lines (112 loc) · 2.5 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
116
117
118
services:
db:
image: ${POSTGRES_IMAGE:-postgres:18.2}
environment:
PGUSER: ferriskey
POSTGRES_DB: ferriskey
POSTGRES_PASSWORD: ferriskey
POSTGRES_USER: ferriskey
ports:
- 5432:5432
volumes:
# Postgres 18+ images are designed to mount /var/lib/postgresql (major-version subdirs inside).
- pgdata:/var/lib/postgresql
healthcheck:
test:
- CMD-SHELL
- pg_isready
- -d
- ferriskey
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
api-build:
build:
context: .
target: api
environment:
ALLOWED_ORIGINS: http://localhost:5555,http://127.0.0.1:5555
DATABASE_HOST: db
DATABASE_NAME: ferriskey
DATABASE_PASSWORD: ferriskey
DATABASE_USER: ferriskey
ports:
- 3333:3333
depends_on:
db-migrations-build:
condition: service_completed_successfully
profiles:
- build
db-migrations-build:
build:
context: .
target: api
entrypoint:
- sqlx
command:
- migrate
- run
- --source
- /usr/local/src/ferriskey/migrations
environment:
DATABASE_URL: postgresql://ferriskey:ferriskey@db/ferriskey
restart: no
depends_on:
db:
condition: service_healthy
profiles:
- build
webapp-build:
build:
context: .
target: webapp
environment:
API_URL: http://localhost:3333
ports:
- 5555:80
profiles:
- build
api-registry:
image: ghcr.io/ferriskey/ferriskey-api
environment:
ALLOWED_ORIGINS: http://localhost:5555
WEBAPP_URL: http://localhost:5555
DATABASE_HOST: db
DATABASE_NAME: ferriskey
DATABASE_PASSWORD: ferriskey
DATABASE_USER: ferriskey
ports:
- 3333:3333
depends_on:
db-migrations-registry:
condition: service_completed_successfully
profiles:
- registry
db-migrations-registry:
image: ghcr.io/ferriskey/ferriskey-api
entrypoint:
- sqlx
command:
- migrate
- run
- --source
- /usr/local/src/ferriskey/migrations
environment:
DATABASE_URL: postgresql://ferriskey:ferriskey@db/ferriskey
restart: no
depends_on:
db:
condition: service_healthy
profiles:
- registry
webapp-registry:
image: ghcr.io/ferriskey/ferriskey-webapp
environment:
API_URL: http://localhost:3333
ports:
- 5555:80
profiles:
- registry
volumes:
pgdata: