Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For now have added docker-compose.yml keeping development in mind. Will soon update it to support docker secrets and add a yml file that can be use in production environment.
- Loading branch information
1 parent
051021d
commit 693eb8a
Showing
10 changed files
with
115 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
USE `aurora_main`; | ||
INSERT INTO `admin` (`variable`, `value`) VALUES | ||
('currentContest', 'test'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
USE `aurora_main`; | ||
ALTER TABLE problems add `sampleinput` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
ALTER TABLE problems add `sampleoutput` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,33 @@ | ||
# DOCKER-VERSION 1.12.0 | ||
FROM debian:latest | ||
FROM ubuntu:latest | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
# INSTALL COMPILERS | ||
RUN apt-get update && apt-get install -y \ | ||
openjdk-7-jdk \ | ||
openjdk-8-jdk \ | ||
g++ \ | ||
python \ | ||
python3 \ | ||
perl \ | ||
locales \ | ||
php5 \ | ||
php \ | ||
ruby \ | ||
rhino \ | ||
fpc \ | ||
mono-complete \ | ||
bc hsbrainfuck \ | ||
mono-complete mono-mcs \ | ||
bf bc \ | ||
psmisc \ | ||
python3-pip | ||
RUN locale-gen "en_US.UTF-8" | ||
COPY requirements.txt /tmp/ | ||
RUN pip3 install --requirement /tmp/requirements.txt | ||
COPY judge.py /judge/ | ||
RUN mkdir /judge/env | ||
RUN mkdir /judge/io_cache | ||
CMD ["python3", "/judge/judge.py"] | ||
RUN chmod 700 /tmp | ||
RUN useradd -m -u 8723 -s /bin/bash judge | ||
WORKDIR /home/judge | ||
RUN mkdir env io_cache | ||
RUN chmod 755 env | ||
RUN chmod 700 io_cache | ||
RUN chown judge env | ||
RUN chgrp judge env | ||
COPY judge.py /home/judge/ | ||
EXPOSE 8723 | ||
CMD ["python3", "judge.py", "-judge", "-cache"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM php:7.2-apache | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends libxml++2.6-dev \ | ||
zlib1g-dev libicu-dev g++ libssl-dev git \ | ||
&& pecl install apcu-5.1.5 && \ | ||
docker-php-ext-enable apcu && \ | ||
docker-php-ext-install \ | ||
intl \ | ||
mbstring \ | ||
pdo_mysql \ | ||
zip \ | ||
bcmath \ | ||
opcache \ | ||
&& docker-php-ext-install -j "$(nproc)" mbstring pdo tokenizer xml zip \ | ||
&& a2enmod rewrite | ||
|
||
WORKDIR /var/www/html | ||
|
||
COPY . /var/www/html | ||
|
||
EXPOSE 80 | ||
EXPOSE 443 | ||
|
||
CMD apache2-foreground |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<VirtualHost *:80 *:443> | ||
ServerAdmin admin@aurora.pushkaranand.com | ||
DocumentRoot "/var/www/html/" | ||
ServerName aurora.pushkaranand.com | ||
ServerName localhost | ||
<Directory "/var/www/html/"> | ||
Options FollowSymLinks | ||
AllowOverride All | ||
|
||
Order allow,deny | ||
Allow from all | ||
</Directory> | ||
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
version: '2' | ||
|
||
services: | ||
mysql: | ||
image: mysql:5 | ||
volumes: | ||
- ./DB:/docker-entrypoint-initdb.d | ||
ports: | ||
- 3306:3306 | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=aurora | ||
|
||
web: | ||
build: ./Web Interface | ||
image: pushkar8723/aurora-web | ||
ports: | ||
- 80:80 | ||
environment: | ||
- AURORA_SQL_USER=root | ||
- AURORA_SQL_PASS=aurora | ||
- AURORA_SQL_DB=aurora_main | ||
- AURORA_SQL_HOST=mysql | ||
volumes: | ||
- ./conf:/etc/apache2/sites-enabled | ||
|
||
judge: | ||
build: ./Judge | ||
image: pushkar8723/aurora-judge | ||
ports: | ||
- 8723:8723 | ||
environment: | ||
- AURORA_SQL_HOSTNAME=mysql | ||
- AURORA_SQL_USERNAME=root | ||
- AURORA_SQL_PASSWORD=aurora | ||
- AURORA_SQL_DATABASE=aurora_main |