Skip to content
Merged

Dev #42

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 4 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,25 +94,11 @@ jobs:
- name: Set up Python
run: uv python install ${{ env.PYTHON_VERSION }}

- name: Install Python dependencies for ctrl.sh
run: pip install jinja2
- name: Install Python dependencies for prepare.py
run: pip install jinja2 pyyaml

- name: Create settings.env
run: |
DOCKER_GID=$(getent group docker | cut -d: -f3)
cat > settings.env << EOF
DEBUG=1
MAINTENANCE_ENABLED=0
ADMIN_PASSWORD=TestAdmin123!
DOCKER_GROUP_ID=${DOCKER_GID}
SSH_HOST_PORT=2222
HTTP_HOST_PORT=8000
SECRET_KEY=TestSecretKeyForCI12345
SSH_TO_WEB_KEY=TestSSHToWebKeyForCI
POSTGRES_PASSWORD=TestPostgresPassword123!
EOF
# Remove leading whitespace from each line
sed -i 's/^[[:space:]]*//' settings.env
- name: Generate configuration
run: ./prepare.py

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ To inspect or edit `settings.yaml` before the first build, run `./prepare.py` ma
| `ports` | `ssh_host_port` | 2222 | SSH reverse-proxy listen port |
| | `http_host_port` | 8080 | HTTP port (plain or redirect) |
| | `https_host_port` | 8443 | HTTPS port |
| `tls` | `mode` | `internal` | `off` (plain HTTP), `internal` (self-signed), or `acme` (Let's Encrypt) |
| `tls` | `mode` | `off` | `off` (plain HTTP), `internal` (self-signed), or `acme` (Let's Encrypt) |
| | `domain` | — | Required for `internal` and `acme` modes |
| | `redirect_http_to_https` | `false` | Redirect HTTP port to HTTPS (`internal` and `acme` modes only) |
| `paths` | `data` | `./data` | Persistent data directory on the host |
Expand Down
8 changes: 0 additions & 8 deletions container-keys/root_key

This file was deleted.

1 change: 0 additions & 1 deletion container-keys/root_key.pub

This file was deleted.

8 changes: 0 additions & 8 deletions container-keys/user_key

This file was deleted.

1 change: 0 additions & 1 deletion container-keys/user_key.pub

This file was deleted.

2 changes: 1 addition & 1 deletion prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def build_default_settings() -> Dict[str, Any]:
},
"tls": {
# off = plain HTTP, internal = self-signed, acme = Let's Encrypt
"mode": "internal",
"mode": "off",
"domain": None,
# Redirect HTTP to HTTPS (only applies to internal and acme modes).
"redirect_http_to_https": False,
Expand Down
2,252 changes: 2,252 additions & 0 deletions ref-docker-base/uv.lock

Large diffs are not rendered by default.

1,433 changes: 731 additions & 702 deletions tests/uv.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions webapp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM python:3.13.1-bookworm

ENV PYTHONIOENCODING=UTF-8

ARG DOCKER_GROUP_ID

# Install dependencies
Expand Down
6 changes: 4 additions & 2 deletions webapp/ref/view/instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ def get_newest_exercise_version(exercise: Exercise):
exercises = Exercise.query.filter(Exercise.short_name == exercise.short_name).all()
new_exercise = list(
filter(
lambda e: e.version > exercise.version
and e.build_job_status == ExerciseBuildStatus.FINISHED,
lambda e: (
e.version > exercise.version
and e.build_job_status == ExerciseBuildStatus.FINISHED
),
exercises,
)
)
Expand Down
891 changes: 476 additions & 415 deletions webapp/uv.lock

Large diffs are not rendered by default.

Loading