-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
107 lines (106 loc) · 2.9 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
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
106
107
---
version: "3.5"
services:
mongodb:
image: mongo:3.4
container_name: mongodb
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
MONGO_INITDB_DATABASE: film_locations
DB_USER: film_locations_user
DB_PASS: film_locations_pass
volumes:
- ./data/init-mongo.sh:/docker-entrypoint-initdb.d/init-mongo.sh:ro
- ./data/mongo-volume:/data/db
- ./data/backups:/data/backups
ports:
- 27017-27019:27017-27019
postgres:
image: postgres:12
container_name: postgres
restart: always
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: password
POSTGRES_DB: film_locations
FILM_LOCATIONS_DB_USER: film_locations_user
FILM_LOCATIONS_DB_PASS: film_locations_pass
FILM_LOCATIONS_DB_NAME: film_locations
volumes:
- ./data/postgres:/var/lib/postgresql/data
- ./data/init-postgres.sh:/docker-entrypoint-initdb.d/init-postgres.sh
- ./data/sql-migrations:/docker-entrypoint-initdb.d/sql-migrations
ports:
- 5432:5432
get_film_locations:
build:
context: .
dockerfile: Dockerfile
image: get-film-locations:local
container_name: get_film_locations
command: bash -c "npm run generate-db"
environment:
ENVIRONMENT: local
DB_HOST: mongodb
DB_PORT: 27017
DB_USER: film_locations_user
DB_PASS: film_locations_pass
DB_NAME: film_locations
SQL_HOST: postgres
SQL_PORT: 5432
SQL_USER: film_locations_user
SQL_PASS: film_locations_pass
SQL_NAME: film_locations
DB_BULK_OP_MAX_SIZE: 10000
MAX_CONCURRENT_REQUESTS: 10
PORT: ${PORT:-8080}
volumes:
- ./lib:/usr/src/app/lib
- ./credentials:/usr/src/app/credentials
- ./scripts:/usr/src/app/scripts
ports:
- 9229:9229
- 8080:${PORT:-8080}
redis:
image: redis:5.0
container_name: redis
ports:
- 6379:6379
film_locations:
build:
context: .
dockerfile: Dockerfile
image: film-locations:local
container_name: film_locations
command: bash -c "npm run server-dev"
environment:
ENVIRONMENT: local
DB_HOST: mongodb
DB_PORT: 27017
DB_USER: film_locations_user
DB_PASS: film_locations_pass
DB_NAME: film_locations
CACHE_HOST: redis
CACHE_PORT: 6379
PORT: 5000
volumes:
- ./lib:/usr/src/app/lib
- ./server:/usr/src/app/server
- ./scripts:/usr/src/app/scripts
ports:
- 5000:5000
- 9229:9229
film_locations_client:
build:
context: .
dockerfile: Dockerfile
image: film-locations-client:local
container_name: film_locations_client
command: bash -c "npm run client-dev"
volumes:
- ./client:/usr/src/app/client
- ./webpack.config.js:/usr/src/app/webpack.config.js
- ./.babelrc:/usr/src/app/.babelrc
ports:
- 3000:3000