mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-05-14 14:22:16 +00:00
Caddy reverse proxy Flask
This commit is contained in:
parent
d7be76f435
commit
76d8e6ad27
4 changed files with 21 additions and 18 deletions
|
@ -1,3 +1,4 @@
|
||||||
expo.leggy.dev
|
expo.leggy.dev {
|
||||||
reverse_proxy / highscores:5000
|
reverse_proxy highscore:8080
|
||||||
#respond "Hello, World!"
|
encode gzip
|
||||||
|
}
|
|
@ -1,11 +1,15 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
FROM python:3.10-alpine
|
FROM python:3.10-alpine
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
RUN apk add --no-cache gcc musl-dev linux-headers
|
RUN apk add --no-cache gcc musl-dev linux-headers
|
||||||
COPY requirements.txt /data/requirements.txt
|
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
|
|
||||||
|
COPY requirements.txt requirements.txt
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt
|
||||||
|
|
||||||
RUN mkdir /highscore
|
RUN mkdir /highscore
|
||||||
COPY /highscore /highscore
|
COPY /highscore /highscore
|
||||||
WORKDIR /highscore
|
WORKDIR /highscore
|
||||||
EXPOSE 5000
|
|
||||||
CMD ["gunicorn", "-b", "localhost:5000", "server:app"]
|
CMD ["gunicorn", "--bind", "highscore:8080", "server:app"]
|
||||||
|
|
|
@ -3,6 +3,7 @@ from flask_migrate import init as migrate_init
|
||||||
from extensions import db, migrate, cache
|
from extensions import db, migrate, cache
|
||||||
from views import blueprint
|
from views import blueprint
|
||||||
|
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.config.from_pyfile('config.py')
|
app.config.from_pyfile('config.py')
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,17 @@
|
||||||
version: "3.9"
|
version: "3.9"
|
||||||
services:
|
services:
|
||||||
caddy:
|
caddy:
|
||||||
hostname: caddy
|
image: caddy:alpine
|
||||||
image: caddy:latest
|
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- 80:80
|
||||||
- "443:443"
|
- 443:443
|
||||||
volumes:
|
volumes:
|
||||||
- ./Caddy/Caddyfile:/etc/caddy/Caddyfile
|
- ./Caddy/Caddyfile:/etc/caddy/Caddyfile
|
||||||
- ./Caddy/data:/data
|
- ./Caddy/data:/data
|
||||||
- ./Caddy/config:/config
|
- ./Caddy/config:/config
|
||||||
environment:
|
links:
|
||||||
- ACME_AGREE=true
|
- highscore
|
||||||
- TZ=Europe/London
|
highscore:
|
||||||
highscores:
|
build: ./Highscore-Server
|
||||||
hostname: highscores
|
volumes:
|
||||||
build: ./Highscore-Server/
|
- ./Highscore-Server/data:/data
|
||||||
ports:
|
|
||||||
- "5000:5000"
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue