Skip to content

Commit

Permalink
Docker file cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
znick committed Nov 6, 2023
1 parent 6bee3c9 commit 1b2dc1d
Show file tree
Hide file tree
Showing 21 changed files with 121 additions and 252 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ anytask/media/
.eggs
sqlite3.db
venv
.idea/
.idea/
.vscode/
26 changes: 0 additions & 26 deletions docker-compose.yml

This file was deleted.

5 changes: 0 additions & 5 deletions docker.env

This file was deleted.

1 change: 0 additions & 1 deletion docker/.gitignore

This file was deleted.

35 changes: 0 additions & 35 deletions docker/Dockerfile

This file was deleted.

12 changes: 0 additions & 12 deletions docker/README.md

This file was deleted.

8 changes: 0 additions & 8 deletions docker/build-image.sh

This file was deleted.

3 changes: 3 additions & 0 deletions docker/db-sync.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker-compose run mysql-db-sync ./db-sync.sh
80 changes: 73 additions & 7 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,77 @@
version: '3'
version: '2'

services:
web:
image: anytask
environment:
- DJANGO_SETTINGS_MODULE=anytask.settings_docker
app:
env_file: env.app
restart: always
image: ghcr.io/znick/anytask:python3.8
links:
- "mariadb:mariadb"
- "rb_symlink:rb_symlink"
ports:
- 80:80
- "8000:8000"
- "3031:3031"
volumes:
- ./data:/app/data
- "/var/lib/anytask/media:/var/lib/anytask/media"
- "/var/log/anytask:/var/log/anytask"
mem_limit: 6GB
ulimits:
nproc: 65535
nofile:
soft: 40000
hard: 50000
ipython:
restart: always
env_file: env.ipython
image: ghcr.io/anytask-org/jupiter_notebook_docker:latest
mem_limit: 600M
ports:
- "5555:5555"
- "8888:8888"
mariadb:
restart: always
env_file: env.mariadb
image: mariadb:10.7.3
expose:
- "3306"
volumes:
- "/var/lib/anytask/mariadb:/var/lib/mysql"
- "/var/lib/anytask/mariadb_cfg:/etc/mysql/conf.d"
rb:
restart: always
env_file: env.rb
image: ghcr.io/znick/reviewboard:latest
links:
- "mariadb:mariadb"
ports:
- "8181:8000"
volumes:
- "/var/lib/anytask/repos:/var/lib/anytask/repos"
- "/var/lib/anytask/rb:/var/www"
ulimits:
nproc: 65535
nofile:
soft: 40000
hard: 50000

easyCI2:
restart: always
image: ghcr.io/znick/easyci2:latest
env_file: env.easyCI2
ports:
- "8001:8000"
- "3032:3031"

rb_symlink:
restart: always
image: ghcr.io/znick/rb_fake_repo_creator:latest
expose:
- "4444"
volumes:
- "/var/lib/anytask/repos:/var/lib/anytask/repos"

mysql-db-sync:
image: ghcr.io/znick/mysql-db-sync:latest
env_file: env.mysql-db-sync
links:
- "mariadb:mariadb"
11 changes: 11 additions & 0 deletions docker/env.app
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
DATABASE_URL="mysql://anytask:anytask@mariadb/anytask"
DJANGO_MANAGEPY_MIGRATE="on"
RB_API_URL="https://anytask.org/rb"
RB_API_PASSWORD="RB_API_PASSWORD"
RB_SYMLINK_SERVICE_URL="http://rb_symlink:4444"
CONTEST_OAUTH="TOKEN"
CONTEST_OAUTH_ID="TOKEN"
CONTEST_OAUTH_PASSWORD="PASSWORD"
PASSPORT_OAUTH_ID="TOKEN"
PASSPORT_OAUTH_PASSWORD="PASSWORD"
IPYTHON_URL="https://ipython.anytask.org/gate/"
5 changes: 5 additions & 0 deletions docker/env.easyCI2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
GITLAB_REPO_ID="123321"
GITLAB_TRIGGER_TOKEN="TOKEN"
GITLAB_READ_PIPELINES_TOKEN="TOKEN"
GITLAB_WEBHOOKS_TOKEN="TOKEN"
PASSWORDS_JSON='{"https://anytask.org": { "username": "easyci_robot", "password": "PASS"}}'
2 changes: 2 additions & 0 deletions docker/env.ipython
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALLOW_ORIGIN="*"
SALT="SALT"
1 change: 1 addition & 0 deletions docker/env.mariadb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MARIADB_ROOT_PASSWORD="PASS"
10 changes: 10 additions & 0 deletions docker/env.mysql-db-sync
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
SRC_USER="root"
SRC_PASS="PASS"
SRC_HOST="mariadb"
SRC_DB="anytask"
SRC_TABLE="auth_user"
DST_USER="root"
DST_PASS="PASS"
DST_HOST="mariadb"
DST_DB="anytask_rb"
DST_TABLE="auth_user"
7 changes: 7 additions & 0 deletions docker/env.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
DBHOST="mariadb"
DBTYPE="mysql"
DB="anytask_rb"
DBUSER="anytask_rb"
DBPASSWORD="PASS"
LANG="C.UTF-8"
LC_ALL="C.UTF-8"
95 changes: 0 additions & 95 deletions docker/nginx-app.conf

This file was deleted.

3 changes: 0 additions & 3 deletions docker/start-uwsgi.sh

This file was deleted.

13 changes: 0 additions & 13 deletions docker/supervisor-app.conf

This file was deleted.

7 changes: 7 additions & 0 deletions docker/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash -x

date
docker compose pull
docker compose up -d
echo Done!
date
30 changes: 0 additions & 30 deletions docker/uwsgi.ini

This file was deleted.

Loading

0 comments on commit 1b2dc1d

Please sign in to comment.