-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
80 lines (77 loc) · 1.79 KB
/
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
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
version: '3'
name: qrafty
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: dev # User the 'dev" stage when targeting development environments
volumes:
- .:/workspace:cached
env_file:
- .env
ports:
- "3000:3000"
environment:
- NODE_ENV=development
backend:
build:
context: ./backend
dockerfile: Dockerfile
target: dev # User the 'dev" stage when targeting development environments
volumes:
- .:/workspace:cached
ports:
- "8000:8000"
depends_on:
- dev-db
- test-db
env_file:
- .env
environment:
- DEV_DATABASE_URL=${DEV_DATABASE_URL}
- TEST_DATABASE_URL=${TEST_DATABASE_URL}
- SECRET_KEY=${SECRET_KEY}
- ENVIRONMENT=${ENVIRONMENT}
dev-db:
image: postgres:latest
volumes:
- postgres_dev_data:/var/lib/postgresql/data
env_file:
- .env
environment:
- POSTGRES_USER=${POSTGRES_DEV_USER}
- POSTGRES_PASSWORD=${POSTGRES_DEV_PASSWORD}
- POSTGRES_DB=${POSTGRES_DEV_DB}
ports:
- "5432:5432"
expose:
- "5432"
test-db:
image: postgres:latest
volumes:
- postgres_test_data:/var/lib/postgresql/data
env_file:
- .env
environment:
- POSTGRES_USER=${POSTGRES_TEST_USER}
- POSTGRES_PASSWORD=${POSTGRES_TEST_PASSWORD}
- POSTGRES_DB=${POSTGRES_TEST_DB}
ports:
- "5433:5432"
expose:
- "5432"
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4:latest
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
ports:
- "8080:8080"
depends_on:
- dev-db
- test-db
volumes:
postgres_dev_data:
postgres_test_data: