-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (36 loc) · 948 Bytes
/
docker-compose.yml
File metadata and controls
38 lines (36 loc) · 948 Bytes
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
version: '3.8'
services:
postgres:
image: postgres:17
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: appdb
ports:
- "6432:5432"
volumes:
- ./schema.sql:/docker-entrypoint-initdb.d/schema.sql
postgraphile:
depends_on:
- postgres
build: .
ports:
- "5678:5678"
volumes:
- ./package.json:/app/package.json
- ./yarn.lock:/app/yarn.lock
- ./.yarn/:/app/.yarn/
- ./.yarnrc.yml:/app/.yarnrc.yml
- ./graphile.config.ts:/app/graphile.config.ts
- ./tags.json5:/app/tags.json5
environment:
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/appdb
entrypoint: >
sh -c "
yarn --frozen-lockfile
until pg_isready -h postgres -p 5432 -U postgres; do
echo 'Waiting for Postgres...';
sleep 1;
done;
exec yarn postgraphile -n 0.0.0.0
"