Skip to content

Commit 2cc10b2

Browse files
committed
chore: update docker commands
1 parent 6d524c4 commit 2cc10b2

File tree

3 files changed

+21
-16
lines changed

3 files changed

+21
-16
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM python:3.11-slim
22

33
RUN apt-get update && apt-get install make
44

5-
WORKDIR /app
5+
WORKDIR /yaylib
66

77
COPY Pipfile .
88

Makefile

+19-14
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,40 @@
1-
.PHONY:
1+
# Docker
2+
.PHONY: up down shell
3+
24
up: # 実行環境の構築&起動
35
docker compose up -d
4-
docker compose exec yaylib bash
6+
make shell
57

6-
.PHONY:
78
down: # コンテナ停止
89
docker compose down
910

10-
.PHONY:
11-
clean-doc:
12-
rm -rf docs/yaylib.* docs/modules.rst docs/_build/
11+
shell:
12+
docker compose exec yaylib bash
1313

14-
.PHONY:
15-
doc: # ドキュメントの生成
16-
make clean-doc
17-
sphinx-apidoc -f -e -o ./docs . tests/* *_test.py setup.py
18-
sphinx-build -b singlehtml ./docs ./docs/_build
14+
# Distribution
15+
.PHONY: build clean publish
1916

20-
.PHONY:
2117
build: # パッケージのビルド
2218
python setup.py sdist
2319
python setup.py bdist_wheel
2420

25-
.PHONY:
2621
clean: # ビルドファイル削除
2722
rm -rf build/
2823
rm -rf dist/
2924
rm -rf yaylib.egg-info/
3025

31-
.PHONY:
3226
publish: # PYPIにパッケージのアップロード
3327
make build
3428
twine upload --repository pypi dist/*
3529
make clean
30+
31+
# Documentation
32+
.PHONY: gen-doc clean-doc
33+
34+
gen-doc: # ドキュメントの生成
35+
make clean-doc
36+
sphinx-apidoc -f -e -o ./docs . tests/* *_test.py setup.py
37+
sphinx-build -b singlehtml ./docs ./docs/_build
38+
39+
clean-doc:
40+
rm -rf docs/yaylib.* docs/modules.rst docs/_build/

compose.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ services:
44
build:
55
context: .
66
volumes:
7-
- .:/app
7+
- .:/yaylib
88
tty: true

0 commit comments

Comments
 (0)