Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: envのロードの処理の変更 #15

Merged
merged 1 commit into from
Dec 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/auto_aggregator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ jobs:
run: |
touch opt/.env
echo "MIDRA_LAB_NOTION_API=${MIDRA_LAB_NOTION_API}" >> opt/.env
echo "NOTION_DATABASE_URL=${NOTION_DATABASE_URL}" >> opt/.env
echo "NOTION_DATABASE_ID=${NOTION_DATABASE_ID}" >> opt/.env
- name: Build and run Docker Compose
run: |
docker-compose up -d --build
- name: Action run python
run: |
docker compose exec zenn-article-aggregator python opt/main.py
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ USER root
COPY requirements.txt /tmp/
RUN pip install --upgrade pip setuptools \
&& pip install --requirement /tmp/requirements.txt

# スクリプトのコピー
COPY . /opt

# コンテナ起動時に実行されるコマンドを指定
CMD ["python", "/opt/main.py"]
3 changes: 3 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ services:
build: .
container_name: 'zenn-article-aggregator'
working_dir: '/root/'
environment:
- MIDRA_LAB_NOTION_API_KEY=${MIDRA_LAB_NOTION_API_KEY}
- NOTION_DATABASE_ID=${NOTION_DATABASE_ID}
tty: true
env_file:
- opt/.env
Expand Down
Loading