Skip to content

Commit 8645c0c

Browse files
committed
chore: 実行環境構築を docker で行えるように
1 parent 901fea5 commit 8645c0c

File tree

4 files changed

+26
-15
lines changed

4 files changed

+26
-15
lines changed

Dockerfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM python:3.11-slim
2+
3+
RUN apt-get update && apt-get install make
4+
5+
WORKDIR /app
6+
7+
COPY Pipfile .
8+
RUN pip install pipenv
9+
RUN pipenv install
10+
COPY . .

Makefile

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
setup: # 仮想環境構築
2-
pip install pipenv
3-
pipenv install --dev
4-
5-
active: # 仮想環境の起動
6-
pipenv shell
7-
8-
clean-venv: # 仮想環境削除
9-
pipenv --rm
1+
.PHONY:
2+
up:
3+
docker compose up -d
4+
docker compose exec -it yaylib bash
105

116
clean-doc:
127
rm -rf docs/yaylib.* docs/modules.rst docs/_build/

README.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -61,23 +61,21 @@
6161

6262
「yaylib」をインストールするには、以下のコマンドをターミナル上で実行します:
6363

64-
```bash
64+
```shell
6565
pip install yaylib
6666
```
6767

6868
<br>
6969

7070
> [!TIP]
71-
> 開発バージョンをインストールする場合は、以下の手順を実行します:
71+
> 開発環境をインストールする場合は、以下の手順を実行します:
7272
73-
```bash
73+
```shell
7474
git clone https://github.com/ekkx/yaylib.git
7575

7676
cd yaylib
7777

78-
make setup
79-
80-
make active
78+
make up
8179
```
8280

8381
<!-- 使用例 -->

compose.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
services:
2+
yaylib:
3+
container_name: python
4+
build:
5+
context: .
6+
volumes:
7+
- .:/app
8+
tty: true

0 commit comments

Comments
 (0)