-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
78 lines (70 loc) · 2.29 KB
/
docker-compose.yaml
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
version: '3.8'
services:
mongodb:
image: mongodb/mongodb-community-server:latest
container_name: mongodb
# ports:
# - "27017:27017"
environment:
- MONGODB_INITDB_ROOT_USERNAME=$MONGODB_USER
- MONGODB_INITDB_ROOT_PASSWORD=$MONGODB_PASS
volumes:
- $PWD/data/db:/data/db
bigkinds-loader:
build:
context: .
args:
UID: $UID
GID: $GID
USER: $DOCKER_USER
PROJ: $PROJ
image: 0jacky/$PROJ:latest
container_name: bigkinds-loader
depends_on:
- mongodb
environment:
- CONN_STR=$CONN_STR
- PLAYWRIGHT_BROWSERS_PATH=/home/$DOCKER_USER/.cache/ms-playwright
volumes:
- $PWD/config:/home/$DOCKER_USER/$PROJ/config
- $PWD/log:/home/$DOCKER_USER/$PROJ/log
- $PWD/data:/home/$DOCKER_USER/$PROJ/data
- $PWD/bigkinds_loader:/home/$DOCKER_USER/$PROJ/bigkinds_loader
- $PWD/scripts:/home/$DOCKER_USER/$PROJ/scripts
command: python scripts/run.py
pytest:
image: 0jacky/$PROJ:latest
container_name: pytest
# environment:
volumes:
- $PWD/config:/home/$DOCKER_USER/$PROJ/config
- $PWD/log:/home/$DOCKER_USER/$PROJ/log
- $PWD/data:/home/$DOCKER_USER/$PROJ/data
- $PWD/src:/home/$DOCKER_USER/$PROJ/src
- $PWD/tests:/home/$DOCKER_USER/$PROJ/tests
command: pytest
doc:
image: 0jacky/$PROJ:latest
container_name: doc
volumes:
- $PWD/bigkinds_loader:/home/$DOCKER_USER/$PROJ/bigkinds_loader
- $PWD/docs:/home/$DOCKER_USER/$PROJ/docs
command: bash -c "rm -f docs/bigkinds_loader* && sphinx-apidoc -o docs bigkinds_loader && cd docs && make clean html"
# shell command: docker compose run --rm --service-ports jupyter
jupyter-lab:
image: 0jacky/$PROJ:latest
container_name: jupyter-lab
depends_on:
- mongodb
environment:
- CONN_STR=$CONN_STR
ports:
- "8888:8888"
volumes:
- $PWD/config:/home/$DOCKER_USER/$PROJ/config
- $PWD/log:/home/$DOCKER_USER/$PROJ/log
- $PWD/data:/home/$DOCKER_USER/$PROJ/data
- $PWD/bigkinds_loader/:/home/$DOCKER_USER/$PROJ/bigkinds_loader
- $PWD/examples:/home/$DOCKER_USER/$PROJ/examples
- $PWD/scripts:/home/$DOCKER_USER/$PROJ/scripts
command: jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root