Skip to content

Conversation

@natkam
Copy link
Contributor

@natkam natkam commented Oct 15, 2025

Changes:

  • fix the data_only.sql file (missing user_id after db migration), remove some of the objects (see below for details), and add directories with initial repos (source and release files for the initial assignment)
  • remove the network used by all containers (dc creates it by default)
  • set default DATABASE_TYPE to sqlite => simpler dc up commands
  • change restart policy to unless-stopped => containers don't restart after system restart (which was annoying in local development)
  • use uv to install Python packages in containers => faster build times

The docker compose setup works, both for sqlite and psql. The initial data is imported into the db in both variants, and the source and release repositories are created.

I've removed some of the assignments (among them, the deleted ones) and all the submissions from the initial data. My reasoning is that on the one hand, it's going to be easier to maintain the initial data when we load less objects; on the other hand, the repo directories tend to get heavy, so this also has the advantage of keeping the initial data size as small as possible.

@natkam natkam requested a review from florian-jaeger October 15, 2025 13:14
@natkam natkam marked this pull request as draft October 15, 2025 15:10
@natkam natkam force-pushed the docker-improvements branch from ca0b3e0 to 67729c1 Compare October 16, 2025 18:05
@florian-jaeger florian-jaeger self-requested a review October 17, 2025 08:52
@natkam natkam force-pushed the docker-improvements branch from 58a6b12 to 22d3dfd Compare October 23, 2025 14:14
natkam and others added 14 commits October 29, 2025 15:27
- remove the network used by all containers (dc creates it by default)
- set default DATABASE_TYPE to sqlite => simpler dc up commands
- change restart policy to unless-stopped => containers don't restart
  after system restart (which was annoying in local development)
`E'\n'` is invalid syntax in sqlite. It was used in
`replace(<very long logs as a string>, '\n', E'\n')` and
`replace(<very long logs as a string>, '\012', E'\n')`.
I just replaced these values (`\n` and `\012`) with newlines.
We don't include the submission files and repos in the initial setup,
and creating the database objects without them doesn't make much sense,
because one cannot do anything with such submissions in grader service.
@natkam natkam force-pushed the docker-improvements branch from 16fe68d to b72014a Compare October 29, 2025 14:43
@natkam
Copy link
Contributor Author

natkam commented Nov 6, 2025

@florian-jaeger Ready for review!

@natkam natkam marked this pull request as ready for review November 7, 2025 13:04
@natkam natkam deleted the docker-improvements branch November 10, 2025 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants