-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.yml
44 lines (39 loc) · 989 Bytes
/
docker-compose.yml
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
version: '3.7'
services:
db:
image: postgres:12.2
environment:
- POSTGRES_PASSWORD
- POSTGRES_USER
- POSTGRES_DB
volumes:
- db-data:/var/lib/postgresql/data
workspace:
build: ./
depends_on:
- db
environment:
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?sslmode=disable
- JWT_SECRET
volumes:
- ./app:/root/app
- ./images:/root/images
- ./src:/root/src
- ./.env:/root/.env
- ./graphiql.html:/root/graphiql.html
- ./schema.graphql:/root/schema.graphql
- ./package.yaml:/root/package.yaml
- ./stack.yaml:/root/stack.yaml
ports:
- 8080:8080
dbmate:
image: amacneil/dbmate:v1.8.0
environment:
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?sslmode=disable
depends_on:
- db
volumes:
- ./db:/db/
command: --wait up
volumes:
db-data: