Remove Caddy
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
18e8f93261
commit
af14718406
|
@ -9,6 +9,6 @@
|
||||||
file_server
|
file_server
|
||||||
}
|
}
|
||||||
handle {
|
handle {
|
||||||
reverse_proxy :8001
|
reverse_proxy backend:8001
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,11 +15,6 @@ RUN apt update && \
|
||||||
bash \
|
bash \
|
||||||
vim \
|
vim \
|
||||||
curl && \
|
curl && \
|
||||||
apt install -y debian-keyring debian-archive-keyring apt-transport-https && \
|
|
||||||
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg && \
|
|
||||||
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list && \
|
|
||||||
apt update && \
|
|
||||||
apt install caddy && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN useradd -m --uid 1000 timetracker
|
RUN useradd -m --uid 1000 timetracker
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
services:
|
||||||
|
timetracker:
|
||||||
|
image: registry.kucharczyk.xyz/timetracker
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: timetracker
|
||||||
|
environment:
|
||||||
|
- TZ=Europe/Prague
|
||||||
|
- CSRF_TRUSTED_ORIGINS="https://tracker.kucharczyk.xyz"
|
||||||
|
user: "1000"
|
||||||
|
# volumes:
|
||||||
|
# - "db:/home/timetracker/app/src/timetracker/db.sqlite3"
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
restart: unless-stopped
|
|
@ -1,17 +1,28 @@
|
||||||
---
|
---
|
||||||
services:
|
services:
|
||||||
timetracker:
|
backend:
|
||||||
image: registry.kucharczyk.xyz/timetracker
|
image: registry.kucharczyk.xyz/timetracker
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: timetracker
|
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/Prague
|
- TZ=Europe/Prague
|
||||||
- CSRF_TRUSTED_ORIGINS="https://tracker.kucharczyk.xyz"
|
- CSRF_TRUSTED_ORIGINS="https://tracker.kucharczyk.xyz"
|
||||||
user: "1000"
|
user: "1000"
|
||||||
# volumes:
|
volumes:
|
||||||
# - "db:/home/timetracker/app/src/timetracker/db.sqlite3"
|
- "static-files:/home/timetracker/app/static"
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
frontend:
|
||||||
|
image: caddy
|
||||||
|
volumes:
|
||||||
|
- "static-files:/usr/share/caddy"
|
||||||
|
- "$PWD/Caddyfile:/etc/caddy/Caddyfile"
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
restart: unless-stopped
|
depends_on:
|
||||||
|
- backend
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
static-files:
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,5 @@ poetry run python manage.py migrate
|
||||||
echo "Collect static files"
|
echo "Collect static files"
|
||||||
poetry run python manage.py collectstatic --clear --no-input
|
poetry run python manage.py collectstatic --clear --no-input
|
||||||
|
|
||||||
echo "Starting server"
|
echo "Starting app"
|
||||||
caddy start
|
|
||||||
poetry run python -m gunicorn --bind 0.0.0.0:8001 timetracker.asgi:application -k uvicorn.workers.UvicornWorker --access-logfile - --error-logfile -
|
poetry run python -m gunicorn --bind 0.0.0.0:8001 timetracker.asgi:application -k uvicorn.workers.UvicornWorker --access-logfile - --error-logfile -
|
||||||
|
|
Loading…
Reference in New Issue