Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
c92s committed Aug 6, 2024
1 parent 8b4aad1 commit b2881f4
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 55 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and Push Docker Image

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}/hello-flask:latest
10 changes: 10 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from flask import Flask

app = Flask(__name__)

@app.route('/')
def hello_world():
return 'Hello, World!'

if __name__ == '__main__':
app.run(debug=True)
20 changes: 20 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use an official Python runtime as a parent image
FROM python:3.12-slim

# Set the working directory in the container
WORKDIR /app

# Copy the current directory contents into the container at /app
COPY . /app

# Install flask package
RUN pip install --no-cache-dir flask

# Make port 8048 available to the world outside this container
EXPOSE 8048

# Define environment variable
ENV FLASK_APP=app.py

# Run app.py when the container launches
CMD ["flask", "run", "--host=0.0.0.0", "--port=8048"]
5 changes: 0 additions & 5 deletions examples/app.py

This file was deleted.

6 changes: 0 additions & 6 deletions makefile

This file was deleted.

20 changes: 0 additions & 20 deletions pyproject.toml

This file was deleted.

Empty file removed src/mymath/__init__.py
Empty file.
Empty file removed src/mymath/geometry/__init__.py
Empty file.
4 changes: 0 additions & 4 deletions src/mymath/geometry/point.py

This file was deleted.

12 changes: 0 additions & 12 deletions src/mymath/geometry/rectangle.py

This file was deleted.

8 changes: 0 additions & 8 deletions src/mymath/lib.py

This file was deleted.

0 comments on commit b2881f4

Please sign in to comment.