-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (36 loc) · 889 Bytes
/
docker-compose.yml
File metadata and controls
39 lines (36 loc) · 889 Bytes
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
version: "3"
services:
postgres:
image: postgres:14.5
container_name: flowbuild_db
restart: always
env_file:
- ./.env.docker
ports:
- 5432:5432
redis:
image: redis:7-bullseye
container_name: flowbuild_redis
restart: always
ports:
- 6379:6379
app:
image: node:18.12
user: root
container_name: flowbuild_app
restart: on-failure:10 # necessary due to possibility of postgres not being ready when service runs
env_file:
- ./.env.docker
environment:
NODE_ENV: docker
tty: true
ports:
- 9229:9229
depends_on:
- postgres
volumes:
- .:/usr/app
- /usr/app/node_modules
working_dir: /usr/app
#command: ./scripts/run_tests.sh
command: bash -c "npm install && npm install knex -g && npm run migrations && npm run seeds && su -c 'npm run tests' node"