-
Notifications
You must be signed in to change notification settings - Fork 73
/
docker-compose.development.yml
91 lines (86 loc) · 1.99 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
version: '3.7'
services:
flask-server:
container_name: flask-server
image: newdle
build:
context: .
dockerfile: Dockerfile
networks:
- default
volumes:
- './:/opt/newdle'
- './docker/development/newdle.cfg.docker:/opt/newdle/newdle/newdle.cfg'
ports:
- 5000:5000
depends_on:
postgres:
condition: service_healthy
environment:
- FLASK_RUN_HOST=0.0.0.0
- FLASK_DEBUG=1
- FLASK_APP=newdle.core.app
- NEWDLE_CONFIG=newdle.cfg
working_dir: /opt/newdle
entrypoint:
- bash
- -c
- |
pip install -q -e '.[dev]'
flask db upgrade
flask run --extra-files newdle/newdle.cfg
user: root
react-server:
container_name: react-server
image: newdle
networks:
- default
volumes:
- './docker/development/newdle.cfg.docker:/newdle/etc/newdle.cfg'
- './newdle/client:/newdle/client'
- '/newdle/client/node_modules'
- type: bind
source: .prettierrc.yaml
target: /newdle/client/.prettierrc.yaml
read_only: true
- type: bind
source: install_node.sh
target: /newdle/client/install_node.sh
read_only: true
ports:
- 3000:3000
depends_on:
postgres:
condition: service_healthy
flask-server:
condition: service_started
working_dir: /newdle/client
environment:
- FLASK_URL=http://flask-server:5000
entrypoint:
- bash
- -c
- |
./install_node.sh
npm install
npm run extract
npm run compile
npm start --loglevel verbose
user: root
stdin_open: true
postgres:
image: postgres
volumes:
- pgsql-data:/var/lib/pgsql/data:rw
networks:
- default
ports:
- 5432:5432
env_file:
- ./docker/development/.env.postgres
healthcheck:
test: "exit 0"
volumes:
pgsql-data:
networks:
default: