-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Paul Spooren <mail@aparcar.org>
- Loading branch information
Showing
7 changed files
with
85 additions
and
104 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
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 |
---|---|---|
|
@@ -22,6 +22,7 @@ instance/ | |
json/ | ||
poetry.lock | ||
public/ | ||
redis/ | ||
site/ | ||
store/ | ||
var/ |
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 @@ | ||
FROM python:3.10-slim | ||
|
||
WORKDIR /app/ | ||
|
||
RUN pip install poetry | ||
|
||
COPY poetry.lock pyproject.toml ./ | ||
|
||
RUN poetry config virtualenvs.create false \ | ||
&& poetry install --only main --no-interaction --no-ansi | ||
|
||
COPY ./asu/ ./asu/ | ||
|
||
COPY ./misc/config.py /etc/asu/config.py | ||
|
||
CMD gunicorn 'asu.asu:create_app()' --bind 0.0.0.0:8000 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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,61 @@ | ||
version: "2" | ||
volumes: | ||
podman-sock: | ||
redis: | ||
services: | ||
server: | ||
image: "aparcar/asu:latest" | ||
environment: | ||
- REDIS_HOST=redis | ||
volumes: | ||
- "./asu-service/public/:/app/public/" | ||
ports: | ||
- "127.0.0.1:8000:8000" | ||
depends_on: | ||
- redis | ||
|
||
janitor: | ||
image: "aparcar/asu:latest" | ||
environment: | ||
- FLASK_APP=asu.asu | ||
- FLASK_DEBUG=1 | ||
- REDIS_HOST=redis | ||
command: flask janitor update | ||
volumes: | ||
- "./asu-service/public/:/app/public/" | ||
depends_on: | ||
- redis | ||
|
||
worker: | ||
image: "aparcar/asu:latest" | ||
command: rqworker --url "redis://redis" | ||
environment: | ||
- CONTAINER_HOST=unix:///tmp/socket/podman.sock | ||
volumes: | ||
- ./asu-service/public/:/app/public/ | ||
- podman-sock:/tmp/socket/ | ||
depends_on: | ||
- redis | ||
- podman | ||
|
||
podman: | ||
image: quay.io/podman/stable | ||
user: podman | ||
volumes: | ||
- podman-sock:/tmp/socket/ | ||
command: sh -c "mkdir -p /tmp/socket && podman system service --time=0 unix:///tmp/socket/podman.sock" | ||
|
||
redis: | ||
image: "redis:alpine" | ||
volumes: | ||
- redis:/data/ | ||
|
||
webserver: | ||
image: caddy | ||
volumes: | ||
- "./misc/Caddyfile:/etc/caddy/Caddyfile" | ||
- "./asu-service:/site/" | ||
ports: | ||
- "8000:8081" | ||
depends_on: | ||
- server |