Compare commits

...

1 Commits

Author SHA1 Message Date
Eriks Karls
bd0674fb0e WIP various updates 2024-09-01 11:53:15 +03:00
7 changed files with 32 additions and 20 deletions

View File

@ -1,11 +1,11 @@
FROM python:3-alpine as base FROM python:3-alpine AS base
WORKDIR /app WORKDIR /app
# Code from https://github.com/nginxinc/docker-nginx/blob/4bf0763f4977fff7e9648add59e0540088f3ca9f/stable/alpine-slim/Dockerfile # Code from https://github.com/nginxinc/docker-nginx/blob/4bf0763f4977fff7e9648add59e0540088f3ca9f/stable/alpine-slim/Dockerfile
ENV NGINX_VERSION 1.25.3 ENV NGINX_VERSION=1.27.1
ENV PKG_RELEASE 1 ENV PKG_RELEASE=1
COPY compose/nginx/install.sh / COPY compose/nginx/install.sh /
RUN /bin/sh /install.sh \ RUN /bin/sh /install.sh \

View File

@ -1,5 +1,5 @@
docker-build: docker-build:
docker build --tag=registry.72.lv/flask-namedays:latest --tag=flask-namedays:latest . docker build --tag=registry.72.lv/flask-namedays:latest --tag=flask-namedays:latest --progress=plain .
docker-push: docker-build docker-push: docker-build
docker push registry.72.lv/flask-namedays:latest docker push registry.72.lv/flask-namedays:latest

8
compose.yml Normal file
View File

@ -0,0 +1,8 @@
services:
app:
build:
dockerfile: Dockerfile
context: .
image: registry.72.lv/flask-namedays:latest
ports:
- "18080:80"

View File

@ -8,6 +8,11 @@ server {
client_max_body_size 32k; client_max_body_size 32k;
location / {
root /usr/share/nginx/html;
index index.html;
}
location /api { location /api {
proxy_pass http://localhost:5000; proxy_pass http://localhost:5000;
@ -29,12 +34,7 @@ server {
proxy_request_buffering off; proxy_request_buffering off;
} }
location / {
root /usr/share/nginx/html;
index index.html;
}
location = /favicon.ico { location = /favicon.ico {
alias /usr/share/nginx/html/static/favicon.ico; alias /usr/share/nginx/s.72.lv/static/favicon.ico;
} }
} }

View File

@ -16,7 +16,7 @@ else \
echo "key verification failed!"; \ echo "key verification failed!"; \
exit 1; \ exit 1; \
fi fi
apk add -X "https://nginx.org/packages/mainline/alpine/v$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" --no-cache $nginxPackages apk add -X "https://nginx.org/packages/ainline/alpine/v$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" --no-cache $nginxPackages
# remove checksum deps # remove checksum deps
apk del --no-network .checksum-deps apk del --no-network .checksum-deps
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps) # if we have leftovers from building, let's purge them (including extra, unnecessary build deps)

View File

@ -1,7 +1,12 @@
FastAPI==0.109.0 FastAPI==0.112.1 # https://github.com/fastapi/fastapi
pydantic==2.5.3 pydantic==2.8.2 # https://github.com/pydantic/pydantic
uvicorn==0.27.0.post1 uvicorn==0.30.6 # https://github.com/encode/uvicorn
python-multipart==0.0.6 python-multipart==0.0.9 # https://github.com/Kludex/python-multipart
icalendar==5.0.11 icalendar==5.0.13 # https://github.com/collective/icalendar
Unidecode==1.3.8 Unidecode==1.3.8 # https://github.com/avian2/unidecode
Gunicorn==21.2.0
gunicorn==23.0.0 # https://github.com/benoitc/gunicorn
# Partial uvicorn[standard] dependencies
httptools==0.6.1
uvloop==0.20.0

View File

@ -9,7 +9,6 @@ from fastapi import FastAPI, Form, HTTPException, responses
from icalendar import Alarm, Calendar, Event from icalendar import Alarm, Calendar, Event
from pydantic import BaseModel from pydantic import BaseModel
from unidecode import unidecode from unidecode import unidecode
from uvicorn.workers import UvicornWorker
def generate_ical_for_mapping(cal: dict[datetime.date, list[str]]) -> BytesIO: def generate_ical_for_mapping(cal: dict[datetime.date, list[str]]) -> BytesIO: