tangled
alpha
login
or
join now
cuducos.me
/
triathlon-live-calendar
0
fork
atom
๐ Calendar file generator for triathlonlive.tv upcoming events
triathlon-live-calendar.fly.dev
0
fork
atom
overview
issues
pulls
pipelines
Deploys to fly.io
Eduardo Cuducos
1 year ago
16e32e63
346c0ef7
+47
-7
3 changed files
expand all
collapse all
unified
split
.github
workflows
deploy.yml
Dockerfile
fly.toml
+16
.github/workflows/deploy.yml
···
1
1
+
name: Deploy
2
2
+
on:
3
3
+
push:
4
4
+
branches:
5
5
+
- main
6
6
+
jobs:
7
7
+
deploy:
8
8
+
name: Deploy app
9
9
+
runs-on: ubuntu-latest
10
10
+
concurrency: deploy-group
11
11
+
steps:
12
12
+
- uses: actions/checkout@v4
13
13
+
- uses: superfly/flyctl-actions/setup-flyctl@master
14
14
+
- run: flyctl deploy --remote-only
15
15
+
env:
16
16
+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
+11
-7
Dockerfile
···
1
1
-
FROM python:3.11-slim
1
1
+
FROM python:3.11-slim-bookworm AS builder
2
2
+
ENV PYTHONUNBUFFERED=1
3
3
+
ENV PYTHONDONTWRITEBYTECODE=1
2
4
WORKDIR /app
3
3
-
RUN pip install poetry && useradd -m keller
4
4
-
USER keller
5
5
-
COPY pyproject.toml .
6
6
-
COPY poetry.lock .
7
7
-
COPY triathlon_live_calendar/ .
5
5
+
RUN pip install poetry && poetry config virtualenvs.in-project true
6
6
+
COPY pyproject.toml poetry.lock ./
8
7
RUN poetry install
9
9
-
CMD ["poetry", "run", "python", "-m", "triathlon_live_calendar", "web"]
8
8
+
9
9
+
FROM python:3.11-slim
10
10
+
WORKDIR /app
11
11
+
COPY --from=builder /app/.venv .venv/
12
12
+
COPY /triathlon_live_calendar ./triathlon_live_calendar
13
13
+
CMD ["/app/.venv/bin/python", "-m", "triathlon_live_calendar", "web"]
+20
fly.toml
···
1
1
+
# fly.toml app configuration file generated for triathlon-live-calendar on 2024-10-05T18:57:12-04:00
2
2
+
#
3
3
+
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
4
4
+
#
5
5
+
6
6
+
app = 'triathlon-live-calendar'
7
7
+
primary_region = 'yul'
8
8
+
9
9
+
[build]
10
10
+
11
11
+
[http_service]
12
12
+
internal_port = 8000
13
13
+
force_https = true
14
14
+
auto_stop_machines = 'stop'
15
15
+
auto_start_machines = true
16
16
+
min_machines_running = 0
17
17
+
processes = ['app']
18
18
+
19
19
+
[[vm]]
20
20
+
size = 'shared-cpu-1x'