Compare commits
29 Commits
4568d21ff9
...
main
Author | SHA1 | Date | |
---|---|---|---|
6072f79697 | |||
58fa7569ff | |||
0cdcb2ee40 | |||
35d02cd885 | |||
0690858dd6 | |||
0a8b995cc1 | |||
cdfff2161a | |||
bf62a7c6d0 | |||
0eb689cef5 | |||
514ce1e83b | |||
2db7f7f2e0 | |||
75313bcdf3 | |||
cf360643df | |||
c28689fe03 | |||
3817378632 | |||
ff9fde556a | |||
6c1444b6dc | |||
c887e64557 | |||
d80ac02e77 | |||
9035fab218 | |||
bc57e3c632 | |||
d9940d045e | |||
56f275cdb7 | |||
27973ac1a0 | |||
408fa3b5ea | |||
96451a01a7 | |||
3a2779c4a2 | |||
cc9df870a1 | |||
833091dd3f |
55
.gitea/workflows/build.yaml
Normal file
55
.gitea/workflows/build.yaml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
name: Build and Push Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
GITEA_SERVER: https://git.rehounou.ca
|
||||||
|
GITEA_REGISTRY: git.rehounou.ca
|
||||||
|
GITEA_TOKEN: ${{ secrets.REPO_GITEA_TOKEN }}
|
||||||
|
PROJECT_NAME: cal_heatmap
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Login to Gitea Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.GITEA_REGISTRY }}
|
||||||
|
username: ${{ secrets.REPO_USERNAME }}
|
||||||
|
password: ${{ secrets.REPO_GITEA_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
env:
|
||||||
|
ACTIONS_RUNTIME_TOKEN: ''
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
${{ secrets.DOCKER_USERNAME }}/cal_heatmap:latest
|
||||||
|
${{ secrets.DOCKER_USERNAME }}/cal_heatmap:1.0.0
|
||||||
|
|
||||||
|
- name: Build and Push Docker Image
|
||||||
|
run: |
|
||||||
|
docker tag ${{ secrets.DOCKER_USERNAME }}/cal_heatmap:latest git.rehounou.ca/remi/cal_heatmap:1.0.0
|
||||||
|
docker push git.rehounou.ca/remi/cal_heatmap:latest
|
||||||
|
docker push git.rehounou.ca/remi/cal_heatmap:1.0.0
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -133,6 +133,7 @@ venv/
|
|||||||
ENV/
|
ENV/
|
||||||
env.bak/
|
env.bak/
|
||||||
venv.bak/
|
venv.bak/
|
||||||
|
cal_env/
|
||||||
|
|
||||||
# Spyder project settings
|
# Spyder project settings
|
||||||
.spyderproject
|
.spyderproject
|
||||||
|
20
DOCKERFILE
20
DOCKERFILE
@ -1,20 +0,0 @@
|
|||||||
# Use the official Python image as a base image
|
|
||||||
FROM python:3.9-slim
|
|
||||||
|
|
||||||
# Set the working directory in the container
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# Copy the requirements file into the container
|
|
||||||
COPY requirements.txt /app/requirements.txt
|
|
||||||
|
|
||||||
# Install the required packages
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
|
||||||
|
|
||||||
# Copy the rest of the application code into the container
|
|
||||||
COPY . /app
|
|
||||||
|
|
||||||
# Expose the port that Streamlit will run on
|
|
||||||
EXPOSE 8501
|
|
||||||
|
|
||||||
# Command to run the Streamlit app
|
|
||||||
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Use the official Python image as a base image
|
||||||
|
FROM python:3-slim
|
||||||
|
|
||||||
|
# Set the working directory in the container
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install pip-chill
|
||||||
|
RUN pip install --no-cache-dir pip-chill
|
||||||
|
|
||||||
|
# Copy the application code into the container
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
# Generate requirements.txt with pip-chill
|
||||||
|
#RUN pip-chill > requirements.txt
|
||||||
|
|
||||||
|
# Install the required packages based on the newly created requirements.txt
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
# Create a directory for the configuration files
|
||||||
|
RUN mkdir /config
|
||||||
|
|
||||||
|
# Expose the port that Streamlit will run on
|
||||||
|
EXPOSE 8501
|
||||||
|
|
||||||
|
# Command to run the Streamlit app
|
||||||
|
CMD ["python","-m","streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
@ -11,7 +11,7 @@ This project generates interactive yearly activity heatmaps using calendar data
|
|||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
- Python 3.9+
|
- Python 3.9+
|
||||||
- Required Python packages (listed in `requirements.txt`)
|
- Required Python packages (listed in `requirements.txt`)!
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
6
requirements.txt
Normal file
6
requirements.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
calmap==0.0.11
|
||||||
|
datetime==5.5
|
||||||
|
pip-chill==1.0.3
|
||||||
|
plotly==5.24.1
|
||||||
|
streamlit==1.41.1
|
||||||
|
vobject==0.9.9
|
Reference in New Issue
Block a user