-
Notifications
You must be signed in to change notification settings - Fork 2
Feat/deployment script #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
dee2445
d157917
ffb777b
60a0a99
0cc296a
18b0a45
205fecc
b3a29d2
0e53795
e249863
62fee0c
3c1be34
f9d855c
6b8cd9e
f937496
a01539a
10ae7f8
e24ef16
197e794
3308db1
28c5828
0a49eea
0975000
ce25e95
8df3106
a373e43
2a2be4b
597267f
2d65641
71e44ee
b3327c2
c901e49
c5cb3f6
f2e70ca
e191212
309f8c3
cc42c81
cd02f26
48dd31b
4cc6fd6
34e890e
12c698d
b1aebcc
c601933
20b8f6d
7a2fef3
5574396
9b44db1
35a6eb0
b4c25f8
f32e1fd
cc61c0c
3a92304
d02e998
a314977
e71f114
ad2ade8
b19e5ab
17d9ca2
72bcbe9
d598370
3888efa
257493e
ed721fa
aa293bb
3e1b61c
44a67aa
44a0818
ece4880
ba841d3
8470be2
745c5d3
e053469
b082ef1
96123f4
a7925f0
e6bd6e0
fc831e9
f9b0f5b
2a924b4
574a0dc
0f28602
7b03695
ab3a1af
6502c42
28dc2ff
b58fca8
dfc3d97
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| config.yaml | ||
| run.py | ||
| .git | ||
| .venv | ||
| .env | ||
| .ruff_cache | ||
| .pytest_cache | ||
| frontend | ||
| .github | ||
| docs | ||
| Makefile | ||
| .pre-commit-config.yaml | ||
| LICENSE | ||
| .gitignore | ||
| .containerignore | ||
| .gitmodules | ||
| podman-compose.yaml | ||
| __pycache__ | ||
| *.py[codz] | ||
| **/__pycache__ | ||
| **/*.py[codz] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: Publish container image | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| REGISTRY: ghcr.io | ||
| IMAGE_NAME: ghcr.io/tech-ji/coursereview | ||
|
|
||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| attestations: write | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Log in to GHCR | ||
| uses: docker/login-action@v4 | ||
Check warningCode scanning / CodeQL Unpinned tag for a non-immutable Action in workflow or composite action Medium
Unpinned 3rd party Action 'Publish container image' step
Uses Step Error loading related location Loading |
||
| with: | ||
| registry: ${{ env.REGISTRY }} | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Extract Docker metadata | ||
| id: meta | ||
| uses: docker/metadata-action@v6 | ||
Check warningCode scanning / CodeQL Unpinned tag for a non-immutable Action in workflow or composite action Medium
Unpinned 3rd party Action 'Publish container image' step
Uses Step: meta Error loading related location Loading |
||
|
PACHAKUTlQ marked this conversation as resolved.
Dismissed
|
||
| with: | ||
| images: ${{ env.IMAGE_NAME }} | ||
| tags: | | ||
| type=sha,prefix=sha- | ||
| type=ref,event=tag | ||
| labels: | | ||
| org.opencontainers.image.source=https://github.com/Tech-JI/CourseReview | ||
| org.opencontainers.image.description=CourseReview Django application | ||
|
|
||
| - name: Build and push image | ||
| id: push | ||
| uses: docker/build-push-action@v7 | ||
Check warningCode scanning / CodeQL Unpinned tag for a non-immutable Action in workflow or composite action Medium
Unpinned 3rd party Action 'Publish container image' step
Uses Step: push Error loading related location Loading |
||
|
PACHAKUTlQ marked this conversation as resolved.
Dismissed
|
||
| with: | ||
| context: . | ||
| file: ./Containerfile | ||
| push: true | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
|
|
||
| - name: Show digest | ||
| run: | | ||
| echo "Digest: ${{ steps.push.outputs.digest }}" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| FROM ghcr.io/astral-sh/uv:python3.14-trixie-slim AS builder | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| COPY . /app | ||
|
|
||
| RUN UV_PROJECT_ENVIRONMENT=/usr/local \ | ||
| uv sync --project=/app --frozen --compile-bytecode --no-dev --no-editable --no-managed-python | ||
|
PACHAKUTlQ marked this conversation as resolved.
|
||
|
|
||
| FROM gcr.io/distroless/base-debian13:nonroot | ||
|
PACHAKUTlQ marked this conversation as resolved.
|
||
|
|
||
| COPY --from=builder /usr/local /usr/local | ||
|
|
||
| COPY --from=builder /app /app | ||
|
PACHAKUTlQ marked this conversation as resolved.
|
||
|
|
||
| WORKDIR /app | ||
|
|
||
| USER nonroot | ||
|
|
||
| ENTRYPOINT ["python", "scripts/entrypoint.py"] | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.