-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.development.yml
105 lines (98 loc) · 2.47 KB
/
docker-compose.development.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
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
x-default-environment: &default-environment
NODE_ENV: development
TZ: "UTC"
AUTH0_DOMAIN: "https://dev-0tc6bn14.eu.auth0.com"
AUTH0_AUDIENCE: testing
DB_HOST: db
DB_NAME: &default-db-name travel_development
DB_PASS: &default-db-password itsallgood
DB_USER: &default-db-user app
DB_PORT: 5432
RELEASE_TAG: "${RELEASE_TAG:-development}"
GIT_COMMIT_HASH: "${GIT_COMMIT_HASH:-not-set}"
services:
api:
build:
context: ./api
dockerfile: development.Dockerfile
env_file:
- ./api/.env.development
environment:
<<: *default-environment
TS_NODE_HISTORY: /usr/src/api/.ts_node_repl_history
tty: true # allows attaching debugger, equivalent of docker exec -t
# stdin_open: true # equivalent of docker exec -i
ports:
- "3000:3000"
volumes:
- ./api:/usr/src/api
- ./.gitignore:/usr/src/.gitignore
- ./.prettierrc.yaml:/usr/src/.prettierrc.yaml
depends_on:
- db
web:
build:
context: ./web
dockerfile: development.Dockerfile
environment:
<<: *default-environment
ports:
- "8080:8080"
volumes:
- ./web:/usr/src/web
- ./.gitignore:/usr/src/.gitignore
- ./.prettierrc.yaml:/usr/src/.prettierrc.yaml
depends_on:
- api
test_api:
build:
context: ./api
dockerfile: development.Dockerfile
command: /bin/true
env_file:
- ./api/.env.development
environment:
<<: *default-environment
NODE_ENV: test
DB_NAME: travel_test
DEFAULT_LOG_LEVEL: "info"
tty: true
volumes:
- ./api:/usr/src/api
- ./api/.env.development:/usr/src/api/.env.test
depends_on:
- db
test_web:
build:
context: ./web
dockerfile: development.Dockerfile
command: /bin/true
environment:
<<: *default-environment
NODE_ENV: test
tty: true
volumes:
- ./web:/usr/src/web
db:
image: "postgres:14.4"
environment:
<<: *default-environment
POSTGRES_USER: *default-db-user
POSTGRES_PASSWORD: *default-db-password
POSTGRES_DB: *default-db-name
restart: always
ports:
- "5432:5432"
volumes:
- db_data:/var/lib/postgresql/data
# For easily generating large PlantUML diagrams
# Not relevant to production environment.
# Accessible at http://localhost:9999
plantuml:
image: plantuml/plantuml-server:jetty
ports:
- 9999:8080
environment:
PLANTUML_LIMIT_SIZE: 8192
volumes:
db_data: