- Unix-based operating system (OS X or Linux)
Dockershould be installedwgetshould be installed
CTFight/web is installed by running one of the following command. Paste it to your terminal and follow installation instructions.
sh -c "$(wget https://github.com/ctfight/web/raw/master/install/remote_install.sh -O -)"Site will run at port 4000
Admin client at port 4001
(MongoDB at standart 27017 port)
- MongoDB inside
mongo_ctfightcontainer - NodeJS express-based application inside
node_ctfightcontainer - Admin database client (mongo-express) inside
admin_ctfightcontainer
Use this type of installation for development
- Install node.js (
npmwill install automatically) 1.1 Or install from repository:sudo apt-get install nodejs nodejs-legacy npm - Install mongodb:
sudo apt-get install mongodb - Start mongodb:
sudo /etc/init.d/mongodb start - Install git:
sudo apt-get install git-core - Clone repository
git clone https://github.com/ctfight/web.git ctfight-web - Go to work folder
cd ctfight-web - Run
npm install -g gulp coffee-script nodemon - Run
npm install - (Optional) Configure mongo-express if you need admin database client
- Run
gulp --production - Copy config file: `cp node_modules/mongo-express/config.default.js node_mod$
- Configure:
nano node_modules/mongo-express/config.js - Run
npm start - Look your site on
https://<ip>:5000(default port)
Use gulp for compiling stylus, yaml and coffeescript (front-end).
Use gulp watch for development. It compile files as soon as they change and it run server at http://localhost:3000
Use gulp --production for compiling files for production
Use npm start for start service at http://localhost:5000 (You must compile files before)
<container> is one of mongo_ctfight, node_ctfight and admin_ctfight
Use docker start to start your containers
docker start <container>Similarly use docker stop
docker stop <container>Get terminal of running container
docker exec -it <container> bashGet list of running process
docker psFor more information use Docker documentation
Add to /etc/apt/source.list:
deb http://linux.nsu.ru/debian jessie-backports main contrib non-free
deb-src http://linux.nsu.ru/debian jessie-backports main contrib non-freeUpdate cache:
apt-get updateInstall:
apt-get install docker.ioNote: Use Docker official documentation if you want to install without Homebrew
- Homebrew should be installed
- VirtualBox should be installed
Install docker and boot2docker:
brew install docker boot2dockerCreate virtual machine:
boot2docker initRun boot2docker:
boot2docker upAdd boot2docker initialization to your shell config (It is often .bashrc)
echo 'eval "$(boot2docker shellinit)"' >> ~/.bashrc