-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
3 changed files
with
47 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Deploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
deploy: | ||
name: Deploy app | ||
runs-on: ubuntu-latest | ||
concurrency: deploy-group | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: superfly/flyctl-actions/setup-flyctl@master | ||
- run: flyctl deploy --remote-only | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |
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 |
---|---|---|
@@ -1,9 +1,13 @@ | ||
FROM python:3.11-slim | ||
FROM python:3.11-slim-bookworm AS builder | ||
ENV PYTHONUNBUFFERED=1 | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
WORKDIR /app | ||
RUN pip install poetry && useradd -m keller | ||
USER keller | ||
COPY pyproject.toml . | ||
COPY poetry.lock . | ||
COPY triathlon_live_calendar/ . | ||
RUN pip install poetry && poetry config virtualenvs.in-project true | ||
COPY pyproject.toml poetry.lock ./ | ||
RUN poetry install | ||
CMD ["poetry", "run", "python", "-m", "triathlon_live_calendar", "web"] | ||
|
||
FROM python:3.11-slim | ||
WORKDIR /app | ||
COPY --from=builder /app/.venv .venv/ | ||
COPY /triathlon_live_calendar ./triathlon_live_calendar | ||
CMD ["/app/.venv/bin/python", "-m", "triathlon_live_calendar", "web"] |
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,20 @@ | ||
# fly.toml app configuration file generated for triathlon-live-calendar on 2024-10-05T18:57:12-04:00 | ||
# | ||
# See https://fly.io/docs/reference/configuration/ for information about how to use this file. | ||
# | ||
|
||
app = 'triathlon-live-calendar' | ||
primary_region = 'yul' | ||
|
||
[build] | ||
|
||
[http_service] | ||
internal_port = 8000 | ||
force_https = true | ||
auto_stop_machines = 'stop' | ||
auto_start_machines = true | ||
min_machines_running = 0 | ||
processes = ['app'] | ||
|
||
[[vm]] | ||
size = 'shared-cpu-1x' |