Compare commits
1 Commits
main
...
WIP_unknow
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bd0674fb0e |
@ -1,11 +1,11 @@
|
||||
FROM python:3-alpine as base
|
||||
FROM python:3-alpine AS base
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Code from https://github.com/nginxinc/docker-nginx/blob/4bf0763f4977fff7e9648add59e0540088f3ca9f/stable/alpine-slim/Dockerfile
|
||||
|
||||
ENV NGINX_VERSION 1.25.3
|
||||
ENV PKG_RELEASE 1
|
||||
ENV NGINX_VERSION=1.27.1
|
||||
ENV PKG_RELEASE=1
|
||||
|
||||
COPY compose/nginx/install.sh /
|
||||
RUN /bin/sh /install.sh \
|
||||
@ -27,4 +27,4 @@ EXPOSE 80
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
#CMD ["gunicorn", "-c", "/app/service/gunicorn.py"]
|
||||
CMD ["uvicorn", "service.app:app", "--host", "0.0.0.0", "--port", "5000", "--proxy-headers", "--no-server-header"]
|
||||
CMD ["uvicorn", "service.app:app", "--host", "0.0.0.0", "--port", "5000", "--proxy-headers", "--no-server-header"]
|
||||
|
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
||||
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 registry.72.lv/flask-namedays:latest
|
||||
|
8
compose.yml
Normal file
8
compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
context: .
|
||||
image: registry.72.lv/flask-namedays:latest
|
||||
ports:
|
||||
- "18080:80"
|
@ -8,6 +8,11 @@ server {
|
||||
|
||||
client_max_body_size 32k;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
}
|
||||
|
||||
location /api {
|
||||
proxy_pass http://localhost:5000;
|
||||
|
||||
@ -29,12 +34,7 @@ server {
|
||||
proxy_request_buffering off;
|
||||
}
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
alias /usr/share/nginx/html/static/favicon.ico;
|
||||
alias /usr/share/nginx/s.72.lv/static/favicon.ico;
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ else \
|
||||
echo "key verification failed!"; \
|
||||
exit 1; \
|
||||
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
|
||||
apk del --no-network .checksum-deps
|
||||
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
|
||||
|
@ -1,7 +1,12 @@
|
||||
FastAPI==0.109.0
|
||||
pydantic==2.5.3
|
||||
uvicorn==0.27.0.post1
|
||||
python-multipart==0.0.6
|
||||
icalendar==5.0.11
|
||||
Unidecode==1.3.8
|
||||
Gunicorn==21.2.0
|
||||
FastAPI==0.112.1 # https://github.com/fastapi/fastapi
|
||||
pydantic==2.8.2 # https://github.com/pydantic/pydantic
|
||||
uvicorn==0.30.6 # https://github.com/encode/uvicorn
|
||||
python-multipart==0.0.9 # https://github.com/Kludex/python-multipart
|
||||
icalendar==5.0.13 # https://github.com/collective/icalendar
|
||||
Unidecode==1.3.8 # https://github.com/avian2/unidecode
|
||||
|
||||
gunicorn==23.0.0 # https://github.com/benoitc/gunicorn
|
||||
|
||||
# Partial uvicorn[standard] dependencies
|
||||
httptools==0.6.1
|
||||
uvloop==0.20.0
|
||||
|
@ -9,7 +9,6 @@ from fastapi import FastAPI, Form, HTTPException, responses
|
||||
from icalendar import Alarm, Calendar, Event
|
||||
from pydantic import BaseModel
|
||||
from unidecode import unidecode
|
||||
from uvicorn.workers import UvicornWorker
|
||||
|
||||
|
||||
def generate_ical_for_mapping(cal: dict[datetime.date, list[str]]) -> BytesIO:
|
||||
|
Loading…
x
Reference in New Issue
Block a user