This repository has been archived by the owner on Mar 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge of `dev` into `master` Commits: * Registration enforcing strong passwords (#442) (ac64f55) * Custom branding for icon and text (#448) (081062c) * Merge of /master into /dev - Baseline for Development (#509) (25c1748) * Updated Language Translations (#511) (b9f031e) * Auto Announcements and Activity Log Expansion (#513) (323ba05) * Level Import Fix (#514) (dc7c87c) * Announcements Controls Rename (#515) (c5da9f7) * Set Default Scoring Cache Values (#516) (ec996a5) * Unique Logos Per Team # (#517) (6d4f919) * Custom Branding Update (#518) (ea78f6a) * Backup and Restore settings.ini on Tests (#519) (eb4a5b5) * Maintain Team Protection on Database Reset (#520) (5d91ae9) * Fixed Login Form JS Bug (Fixes: #521) (#523) (2b1474b) * Level Deletion Confirmation and Bug Fixes (#512) (4a7b5b5) * Provision Streamlined, Quick Setup Added, and Multiple Containers Support (#535) (b487fc1) * Merge branch 'dev' into WraySec/fbctf/merge@7f8c281
- Loading branch information
Showing
66 changed files
with
2,022 additions
and
327 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
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,56 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
VAGRANTFILE_API_VERSION = "2" | ||
|
||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | ||
config.vm.box = "ubuntu/trusty64" | ||
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'" | ||
|
||
# MySQL Server | ||
config.vm.define "mysql" do |mysql| | ||
mysql.vm.network "private_network", ip: "10.10.10.6" | ||
mysql.vm.hostname = "mysql" | ||
mysql.vm.provision "shell", path: "extra/provision.sh", args: "ENV['FBCTF_PROVISION_ARGS'] --multiple-servers --server-type mysql", privileged: false | ||
mysql.vm.provider "virtualbox" do |v| | ||
v.memory = 1024 | ||
v.cpus = 2 | ||
end | ||
end | ||
|
||
# Cache Server | ||
config.vm.define "cache" do |cache| | ||
cache.vm.network "private_network", ip: "10.10.10.8" | ||
cache.vm.hostname = "cache" | ||
cache.vm.provision "shell", path: "extra/provision.sh", args: "ENV['FBCTF_PROVISION_ARGS'] --multiple-servers --server-type cache", privileged: false | ||
cache.vm.provider "virtualbox" do |v| | ||
v.memory = 1024 | ||
v.cpus = 2 | ||
end | ||
end | ||
|
||
# HHVM Server | ||
config.vm.define "hhvm" do |hhvm| | ||
hhvm.vm.network "private_network", ip: "10.10.10.7" | ||
hhvm.vm.hostname = "hhvm" | ||
hhvm.vm.provision "shell", path: "extra/provision.sh", args: "ENV['FBCTF_PROVISION_ARGS'] --multiple-servers --server-type hhvm --mysql-server 10.10.10.6 --cache-server 10.10.10.8", privileged: false | ||
hhvm.vm.provider "virtualbox" do |v| | ||
v.memory = 1024 | ||
v.cpus = 2 | ||
end | ||
end | ||
|
||
# Nginx Server | ||
config.vm.define "nginx" do |nginx| | ||
nginx.vm.network "private_network", ip: "10.10.10.5" | ||
nginx.vm.network "forwarded_port", guest: 80, host: 80 | ||
nginx.vm.network "forwarded_port", guest: 443, host: 443 | ||
nginx.vm.hostname = "nginx" | ||
nginx.vm.provision "shell", path: "extra/provision.sh", args: "ENV['FBCTF_PROVISION_ARGS'] --multiple-servers --server-type nginx --hhvm-server 10.10.10.7", privileged: false | ||
nginx.vm.provider "virtualbox" do |v| | ||
v.memory = 1024 | ||
v.cpus = 2 | ||
end | ||
end | ||
|
||
end |
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,16 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
VAGRANTFILE_API_VERSION = "2" | ||
|
||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | ||
config.vm.box = "ubuntu/trusty64" | ||
config.vm.network "private_network", ip: "10.10.10.5" | ||
config.vm.hostname = "facebookCTF-Dev" | ||
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'" | ||
config.vm.provision "shell", path: "extra/provision.sh", args: ENV['FBCTF_PROVISION_ARGS'], privileged: false | ||
config.vm.provider "virtualbox" do |v| | ||
v.memory = 4096 | ||
v.cpus = 4 | ||
end | ||
end |
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
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,49 @@ | ||
version: '2' | ||
services: | ||
mysql: | ||
restart: always | ||
build: | ||
context: . | ||
dockerfile: extra/mysql/Dockerfile | ||
#args: | ||
# MODE: prod | ||
environment: | ||
MYSQL_ROOT_PASSWORD: root | ||
expose: | ||
- "3306" | ||
|
||
cache: | ||
restart: always | ||
build: | ||
context: . | ||
dockerfile: extra/cache/Dockerfile | ||
#args: | ||
# MODE: prod | ||
expose: | ||
- "11211" | ||
|
||
hhvm: | ||
restart: always | ||
build: | ||
context: . | ||
dockerfile: extra/hhvm/Dockerfile | ||
#args: | ||
# MODE: prod | ||
depends_on: | ||
- mysql | ||
- cache | ||
expose: | ||
- "9000" | ||
|
||
nginx: | ||
restart: always | ||
build: | ||
context: . | ||
dockerfile: extra/nginx/Dockerfile | ||
#args: | ||
# MODE: prod | ||
depends_on: | ||
- hhvm | ||
ports: | ||
- "80:80" | ||
- "443:443" |
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,17 @@ | ||
FROM ubuntu:trusty | ||
LABEL maintainer="Boik Su <boik@tdohacker.org>" | ||
|
||
ENV HOME /root | ||
|
||
ARG DOMAIN | ||
ARG EMAIL | ||
ARG MODE=dev | ||
ARG TYPE=self | ||
ARG KEY | ||
ARG CRT | ||
|
||
WORKDIR $HOME | ||
COPY . $HOME | ||
|
||
RUN ./extra/provision.sh -m $MODE -c $TYPE -k $KEY -C $CRT -D $DOMAIN -e $EMAIL -s `pwd` --docker --multiple-servers --server-type cache | ||
CMD ["./extra/cache/cache_startup.sh"] |
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,11 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
service memcached restart | ||
|
||
while true; do | ||
sleep 5 | ||
|
||
service memcached status | ||
done |
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,17 @@ | ||
FROM ubuntu:trusty | ||
LABEL maintainer="Boik Su <boik@tdohacker.org>" | ||
|
||
ENV HOME /root | ||
|
||
ARG DOMAIN | ||
ARG EMAIL | ||
ARG MODE=dev | ||
ARG TYPE=self | ||
ARG KEY | ||
ARG CRT | ||
|
||
WORKDIR $HOME | ||
COPY . $HOME | ||
|
||
RUN ./extra/provision.sh -m $MODE -c $TYPE -k $KEY -C $CRT -D $DOMAIN -e $EMAIL -s `pwd` --docker --multiple-servers --server-type hhvm --mysql-server mysql --cache-server cache | ||
CMD ["./extra/hhvm/hhvm_startup.sh"] |
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,15 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
service hhvm restart | ||
|
||
while true; do | ||
if [[ -e /var/run/hhvm/sock ]]; then | ||
chown www-data:www-data /var/run/hhvm/sock | ||
fi | ||
|
||
sleep 5 | ||
|
||
service hhvm status | ||
done |
Oops, something went wrong.