-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
154 lines (105 loc) · 3.19 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
154 lines (105 loc) · 3.19 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# docker-compose.yml
x-common-service: &common-service
extends:
file: docker-compose.yml
service: base
x-development-build: &development-build
context: .
dockerfile: Dockerfile
target: development
# Runtime settings shared by development helper services. Only `app` receives
# the build definition; every other service reuses the resulting image.
x-development-service: &development-service
<<: *common-service
image: doc-gen-dev:latest
environment:
ENVIRONMENT: development
stdin_open: true
tty: true
services:
# =========================================================
# 🚀 MAIN APPLICATION
# =========================================================
app:
<<: *development-service
build: *development-build
# =========================================================
# 🐚 SHELL
# =========================================================
shell:
<<: *development-service
entrypoint: []
command: sh
# =========================================================
# 🧶 LINTING
# =========================================================
lint:
<<: *development-service
entrypoint: []
command: >
python -m ruff check app tests
lint-fix:
<<: *development-service
entrypoint: []
command: >
python -m ruff check --fix app tests
# =========================================================
# 🧶 FORMATTING
# =========================================================
format:
<<: *development-service
entrypoint: []
command: >
python -m black app tests
format-check:
<<: *development-service
entrypoint: []
command: >
python -m black app tests --check
# =========================================================
# 🧪 TESTING
# =========================================================
test:
<<: *development-service
entrypoint: []
command: python -m pytest -v
# =========================================================
# 📚 DOCUMENTATION
# =========================================================
docs:
image: squidfunk/mkdocs-material:latest
ports:
- "8001:8000" # HostPort:ContainerPort — user 8001 externally
working_dir: /workspace
volumes:
- .:/workspace # Mount your project so it can be read mkdocs.yml and docs/
# command: serve -a 0.0.0.0:8000 # Old Syntax
entrypoint: python -m mkdocs
command: serve --dev-addr=0.0.0.0:8000
# =========================================================
# 📦 PACKAGE BUILD
# =========================================================
build:
<<: *development-service
entrypoint: []
command: python -m build
# =========================================================
# ✅ QUALITY ASSURANCE
# =========================================================
check:
<<: *development-service
entrypoint: []
command: >
sh -c "
python -m black --check app tests &&
python -m ruff check app tests &&
python -m pytest -v
"
fix:
<<: *development-service
entrypoint: []
command: >
sh -c "
python -m black app tests &&
python -m ruff check --fix app tests
"