devops
This commit is contained in:
47
.gitea/workflows/build.yaml
Normal file
47
.gitea/workflows/build.yaml
Normal file
@ -0,0 +1,47 @@
|
||||
name: Build and Push Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
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: Build and push Docker image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKER_USERNAME }}/my-image:latest
|
||||
|
||||
push_to_gitea:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Push to Gitea
|
||||
env:
|
||||
GITEA_SERVER: ${{ secrets.ADDRESS_GITEA_SERVER }}
|
||||
GITEA_TOKEN: ${{ secrets.REPO_GITEA_TOKEN }}
|
||||
run: |
|
||||
docker tag ${{ secrets.DOCKER_USERNAME }}/my-image:latest ${GITEA_SERVER}/my-repo/my-image:latest
|
||||
docker push ${GITEA_SERVER}/my-repo/my-image:latest
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -133,6 +133,7 @@ venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
cal_env/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
|
@ -4,15 +4,18 @@ 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 pip-chill
|
||||
RUN pip install --no-cache-dir pip-chill
|
||||
|
||||
# Install the required packages
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy the rest of the application code into the container
|
||||
# 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
|
||||
|
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