-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6af1455
commit 2c88649
Showing
11 changed files
with
739 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,6 @@ dist | |
/testdir2 | ||
/testdir* | ||
/caroline/temp | ||
/test_new_dev | ||
/test_new_dev | ||
*.tar | ||
my_deploy.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM nginx | ||
COPY caroline/html_dist /usr/share/nginx/html/caroline/ | ||
COPY caroline/html_dist/index.html /usr/share/nginx/html/. | ||
COPY roundtable.conf /etc/nginx/conf.d/default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#! /bin/bash | ||
|
||
echo "Build proxy image" | ||
podman build -f Dockerfile_proxy -t roundtable_proxy | ||
|
||
echo "Build application server" | ||
podman build -f caroline/server/Dockerfile -t roundtable_application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim AS build-env | ||
|
||
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy | ||
WORKDIR /app | ||
RUN --mount=type=cache,target=/root/.cache/uv \ | ||
--mount=type=bind,source=uv.lock,target=uv.lock \ | ||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \ | ||
uv sync --frozen --no-install-project --no-dev | ||
# ADD caroline_relay_server.py /app | ||
# ENV PATH="/app/.venv/bin:$PATH" | ||
# CMD ["gunicorn", "-k", "gevent", "-w", "1", "caroline_relay_server:app", "--bind", "0.0.0.0:8000"] | ||
|
||
FROM python:3.11-slim-bookworm | ||
COPY --from=build-env /app /app | ||
ENV PATH="/app/.venv/bin:$PATH" | ||
WORKDIR /app | ||
ADD caroline_relay_server.py /app | ||
CMD ["gunicorn", "-k", "gevent", "-w", "1", "caroline_relay_server:app", "--bind", "0.0.0.0:8000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[project] | ||
name = "server" | ||
version = "0.1.0" | ||
description = "Add your description here" | ||
readme = "README.md" | ||
requires-python = ">=3.11" | ||
dependencies = [ | ||
"flask-cors>=5.0.0", | ||
"flask>=3.1.0", | ||
"flask-socketio>=5.5.0", | ||
"pillow>=11.0.0", | ||
"pyjwt>=2.10.1", | ||
"requests>=2.32.3", | ||
"qrcode[pil]>=8.0", | ||
"gunicorn>=23.0.0", | ||
"gevent>=24.11.1", | ||
] |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#! /bin/bash | ||
|
||
echo "Create pod roundtable" | ||
podman pod create -p 127.0.0.1:8001:80 --replace roundtable | ||
|
||
podman run -d --pod roundtable --replace --memory=2GB --cpus=2 \ | ||
--name roundtable_proxy_instance1 \ | ||
localhost/roundtable_proxy:latest | ||
|
||
podman run -d --pod roundtable --replace --memory=2GB --cpus=2 \ | ||
--name roundtable_application_instance1 \ | ||
-e SECRET_KEY="YOUR_RANDOM_STIRNG*" \ | ||
-e SUBSCRIBER_KEY="YOUR_SUBSCRIBER_TOKEN_RANDOM_STRING" \ | ||
-e GOOGLE_RECAPTCHA_SECRET="FORM_GOOGLE" \ | ||
-e SERVER_DOMAIN_NAME="DOMAIN_NAME" \ | ||
localhost/roundtable_application:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
server { | ||
listen 80; | ||
listen [::]:80; | ||
|
||
server_name _; | ||
|
||
root /usr/share/nginx/html; | ||
|
||
include /etc/nginx/default.d/*.conf; | ||
|
||
gzip on; | ||
gzip_vary on; | ||
gzip_min_length 10240; | ||
gzip_types text/css text/javascript application/x-javascript; | ||
|
||
|
||
location / { | ||
index index.html; | ||
gzip on; | ||
gzip_types application/json; | ||
gzip_static on; | ||
|
||
} | ||
|
||
location /socket.io { | ||
proxy_http_version 1.1; | ||
proxy_buffering off; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "Upgrade"; | ||
proxy_pass http://127.0.0.1:8000/socket.io; | ||
} | ||
|
||
location /api { | ||
gzip on; | ||
gzip_types application/json; | ||
gzip_static on; | ||
|
||
proxy_http_version 1.1; | ||
proxy_buffering off; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "Upgrade"; | ||
proxy_pass http://127.0.0.1:8000; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
server { | ||
listen 80; | ||
listen [::]:80; | ||
|
||
server_name _; | ||
|
||
include /etc/nginx/default.d/*.conf; | ||
|
||
location / { | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
|
||
proxy_http_version 1.1; | ||
proxy_buffering off; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "Upgrade"; | ||
proxy_pass http://127.0.0.1:8001; | ||
} | ||
|
||
} |