npm run production run for production (install dependences before)
npm run update update and restart
- Unix-based operating system (OS X or Linux)
Dockermust be installedwgetmust be installed
- Clone repository
git clone https://github.com/ctfight/web.git ctfight-web - Go to install folder
cd ctfight-web/install - Give permission to
install_all.shscriptchmod +x install_all.sh - Run script
./install_all.sh - Follow installation instructions
Site will run at port 4000
Admin client at port 4001
To get your CTFight/web you'll need to run the following command. Paste it into your terminal and follow installation instructions.
sudo 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
- Get terminal of node_ctfight
docker exec -it node_ctfight bash - Download latest version of sources
git pull --rebase - Update node modules
npm install - Compile assets
gulp --production - Press
^Dto exit
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/mongod 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_modules/mongo-express/config.js - Configure:
nano node_modules/mongo-express/config.js(Default login isadmin, password ispass) - Run
CTFIGHT_PASS='your_pass' npm start - Look your site on
http://localhost:5000(default port)
Use gulp to compile stylus, yaml and coffeescript (front-end).
Use gulp watch to develop. It compiles files as soon as they change and it runs server at http://localhost:3000
Use gulp --production to compile files for production
Use CTFIGHT_PASS='your_pass'; npm start to start service at http://localhost:5000 (You must compile files in first)
Use npm run admin to start admin client at http://localhost:8081
<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 the running container
docker exec -it <container> bashGet list of running processes
docker psFor more information use Docker documentation
curl -sSL https://get.docker.com/ | shNote: 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 (Usually it's .bashrc)
echo 'eval "$(boot2docker shellinit)"' >> ~/.bashrc