-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [KAN-17] 자동완성 배치 ci/cd 구축 * [KAN-17] 자동완성 배치 ci/cd 구축 - 테스트 * [KAN-17] 자동완성 배치 ci/cd 구축 - 테스트 * [KAN-17] 테스트 롤백
- Loading branch information
1 parent
0fbc3ae
commit 37dc22c
Showing
4 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Autocomplete Batch Job | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
batch-job: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Docker Build And Push | ||
run: | | ||
docker login -u ${{ secrets.USERNAME }} -p ${{ secrets.PASSWORD }} | ||
docker build -t skku-autocomplete-batch . | ||
docker tag skku-autocomplete-batch sinkyoungdeok/skku-autocomplete-batch | ||
docker push sinkyoungdeok/skku-autocomplete-batch | ||
- name: Deploy Prod | ||
uses: appleboy/[email protected] | ||
with: | ||
key: ${{ secrets.SSH_KEY }} | ||
host: ${{ secrets.HOST_NAME }} | ||
username: ubuntu | ||
port: 22 | ||
script: | | ||
docker login -u ${{ secrets.USERNAME }} -p ${{ secrets.PASSWORD }} | ||
docker pull sinkyoungdeok/skku-autocomplete-batch | ||
docker run --net ubuntu_default sinkyoungdeok/skku-autocomplete-batch | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM python:3.8-slim | ||
|
||
COPY requirements.txt requirements.txt | ||
COPY restaurants.csv restaurants.csv | ||
COPY main.py main.py | ||
|
||
RUN pip install -r requirements.txt | ||
|
||
ENTRYPOINT ["python3", "main.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
redis | ||
pandas |