Skip to content

Commit

Permalink
Prepared for dockering.
Browse files Browse the repository at this point in the history
  • Loading branch information
iwatkot committed Jan 23, 2024
1 parent f66af70 commit ab5d96f
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.git/
.venv/
.vscode/
archives/
cache/
logs/
output/
previews/
src/main.py
temp/
.flake8
.gitignore
LICENSE.md
README.md
requirements.txt
run.ps1
run.sh
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Docker Image CI

on:
push:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: iwatkot/maps4fs:latest
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM python:3.12-slim

WORKDIR /usr/src/app

COPY . .

RUN pip install -r bot_requirements.txt

CMD ["python", "-u", "./src/main.py"]
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

echo "Starting building Docker image..."
docker build --platform linux/amd64 -t iwatkot/maps4fs .
echo "Docker image has been successfully built, exiting..."

0 comments on commit ab5d96f

Please sign in to comment.