basic setup
This commit is contained in:
parent
b01d3f7cf0
commit
e6b2e45848
6 changed files with 46 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.vagrant
|
21
Vagrantfile
vendored
Normal file
21
Vagrantfile
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
Vagrant.configure(2) do |config|
|
||||
config.vm.box = "ubuntu/trusty64"
|
||||
# config.vm.box_check_update = false
|
||||
|
||||
config.vm.network :forwarded_port, guest: 80, host: 8080, auto_correct: true
|
||||
config.vm.network :forwarded_port, guest: 8000, host: 8000, auto_correct: true
|
||||
config.vm.network :forwarded_port, guest: 27017, host: 27017, auto_correct: true
|
||||
|
||||
config.vm.synced_folder "server", "/home/vagrant/server"
|
||||
config.vm.synced_folder "scripts", "/home/vagrant/scripts"
|
||||
|
||||
config.vm.provision :shell, :path => "scripts/setup.sh"
|
||||
config.ssh.forward_agent = true
|
||||
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
vb.customize ["modifyvm", :id, "--memory", "2048"]
|
||||
end
|
||||
end
|
2
deploy
Normal file
2
deploy
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
|
2
scripts/requirements.txt
Normal file
2
scripts/requirements.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Flask
|
||||
gunicorn
|
11
scripts/setup.sh
Normal file
11
scripts/setup.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Updating system..."
|
||||
apt-get -y update
|
||||
apt-get -y upgrade
|
||||
|
||||
echo "Installing dependencies..."
|
||||
apt-get -y install python-pip
|
||||
|
||||
echo "Installing pip dependencies..."
|
||||
pip install -r scripts/requirements.txt
|
9
server/app.py
Normal file
9
server/app.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
from flask import Flask
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route("/")
|
||||
def hello_world():
|
||||
return "Hello, EasyCTF!"
|
||||
|
||||
app.run(port=8000)
|
Loading…
Reference in a new issue