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

Adds in Dockerfile and fixes requirements.txt #1

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
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: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
license.txt
Dockerfile
readme.md
scraper.ex.json

32 changes: 32 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Docker Image CI

on:
push:

jobs:

build:

runs-on: ubuntu-latest
permissions:
packages: write
contents: read

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag neofuuka

- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Push image
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/neofuuka
VERSION=force-newest

echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION

docker tag neofuuka $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM python:3.10.5-bullseye
WORKDIR /neofuuka

RUN apt update && apt install libmariadb-dev
COPY requirements.txt .
RUN pip install -r requirements.txt

COPY . .
CMD python scraper.py
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ psutil~=5.8
pymysql~=1.0
pytz~=2021.2
requests~=2.26
redis~=4.3.4