-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
73 lines (71 loc) · 1.66 KB
/
docker-compose-dev.yml
File metadata and controls
73 lines (71 loc) · 1.66 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
version: '3.7'
services:
db:
image: postgres
restart: always
ports:
- "5433:5432"
volumes:
- pgdata:/var/lib/postgresql/data
env_file:
- .env
migrator:
image: migrate/migrate
restart: 'no'
volumes:
- ./backend/db_migrations:/migrations
entrypoint: ["migrate", "-path", "/migrations", "-database", "postgres://postgres:$POSTGRES_PASSWORD@db/postgres?sslmode=disable"]
env_file:
- .env
depends_on: ['db']
links: ['db']
create-migration:
image: migrate/migrate
restart: 'no'
volumes:
- ./backend/db_migrations:/migrations
entrypoint: ["migrate", "-path", "/migrations", "-database", "postgres://postgres:$POSTGRES_PASSWORD@db/postgres?sslmode=disable", "create", "-dir", "/migrations", "-ext", "sql", "-seq"]
env_file:
- .env
depends_on: ['db']
links: ['db']
graphql:
build:
context: backend
ports:
- "4000:4000"
# This is required for schema.graphql to get updated with new migrations
volumes:
- ./backend:/app:z
- /app/node_modules
env_file:
- .env
environment:
DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD}@db/?sslmode=disable
ENABLE_SSH: "false"
OWNER_DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD}@db/?sslmode=disable
PG_HOST: db
depends_on:
- db
links:
- db
frontend:
build:
context: mealplanner-ui
ports:
- "3000:80"
depends_on:
- graphql
links:
- graphql
admin:
build:
context: admin-ui
ports:
- "2000:80"
depends_on:
- graphql
links:
- graphql
volumes:
pgdata: