Skip to content

Commit

Permalink
Fix and improve the docker setup (sio2project#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
otargowski authored Dec 2, 2024
1 parent 44f554c commit c48f77d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ RUN pip3 install --user bsddb3==6.2.7
WORKDIR /sio2/oioioi

COPY --chown=oioioi:oioioi setup.py requirements.txt ./
RUN pip3 install -r requirements.txt --user
RUN pip3 install -r requirements.txt --user filetracker[server]
COPY --chown=oioioi:oioioi requirements_static.txt ./
RUN pip3 install -r requirements_static.txt --user

Expand Down
4 changes: 2 additions & 2 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '2.4'
# https://github.com/docker/cli/issues/1293
services:
db:
image: library/postgres:12.2
Expand Down Expand Up @@ -27,6 +25,7 @@ services:
# - "7887:7887"
volumes:
- .:/sio2/oioioi
- filetracker-data-dev:/sio2/deployment/media
# - ./deployment:/sio2/deployment
stop_grace_period: 3m
depends_on:
Expand All @@ -50,3 +49,4 @@ services:
stop_grace_period: 1m
volumes:
postgress-data-dev:
filetracker-data-dev:
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
db:
image: library/postgres:12.2
Expand All @@ -18,6 +17,8 @@ services:
depends_on:
- db
- broker
volumes:
- filetracker-data:/sio2/deployment/media
worker:
image: sio2project/oioioi:$OIOIOI_VERSION
command: ["/sio2/oioioi/worker_init.sh"]
Expand All @@ -34,3 +35,4 @@ services:
stop_grace_period: 1m
volumes:
postgress-data:
filetracker-data:
3 changes: 2 additions & 1 deletion easy_toolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
RAW_COMMANDS = [
("build", "Build OIOIOI container from source.", "build", True),
("up", "Run all SIO2 containers", "up -d"),
("down", "Stop and remove all SIO2 containers", "down", True),
("down", "Stop and remove all SIO2 containers", "down"),
("wipe", "Stop all SIO2 containers and DESTROY all data", "down -v", True),
("run", "Run server", "{exec} web python3 manage.py runserver 0.0.0.0:8000"),
("stop", "Stop all SIO2 containers", "stop"),
("bash", "Open command prompt on web container.", "{exec} web bash"),
Expand Down

0 comments on commit c48f77d

Please sign in to comment.