Added deploy files

This commit is contained in:
2021-10-24 17:16:07 +02:00
parent 7f82b25cde
commit 4363674265
6 changed files with 64 additions and 2 deletions

23
deploy/Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM klakegg/hugo:alpine-ci
# Install git and ssh
RUN apk add --no-cache git openssh
# Install python/pip
ENV PYTHONUNBUFFERED=1
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools
WORKDIR /app
# Install requirements
COPY requirements.txt requirements.txt
COPY main.py main.py
RUN pip install -r requirements.txt
# Add scripts
COPY scripts scripts
RUN chmod +x scripts/*.sh
CMD python main.py

9
deploy/deploy.sh Normal file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
set -e
# BUILD
docker build . -f deploy/Dockerfile -t webhooks:latest
# PUBLISH
docker tag pasta-server marc.sastre.cat/webhooks:latest
docker push marc.sastre.cat/webhooks