-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate-openapi.yml
More file actions
38 lines (37 loc) · 1.03 KB
/
Copy pathgenerate-openapi.yml
File metadata and controls
38 lines (37 loc) · 1.03 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
version: "3.7"
services:
back:
image: python:3.12
volumes:
- ./requirements-dev.lock:/srv/requirements-dev.lock
- ./icha:/srv/icha
- ./app.py:/srv/app.py
- ./.env:/srv/.env
working_dir: /srv
command:
- bash
- -c
- |
pip install --upgrade pip
PYTHONDONTWRITEBYTECODE=1
pip install --no-cache-dir -r requirements-dev.lock
python -m uvicorn app:app --host 0.0.0.0 --reload
healthcheck:
test: [ "CMD-SHELL", "curl http://localhost:8000/health || exit 1" ] # exitコードは 0 or 1 に揃えておく。
start_period: "10s"
retries: 30
timeout: "5s"
interval: "5s"
openapi-generator:
image: openapitools/openapi-generator-cli
volumes:
- ./:/src
command:
- bash
- -c
- |
docker-entrypoint.sh generate -i http://back:8000/openapi.json -g typescript-fetch -o /src/api_clients --skip-validate-spec
chmod 777 -R /src/
depends_on:
back:
condition: service_healthy