Skip to content

heyimjustalex/CTFtastic

Repository files navigation

CTFtastic

App that is used to organize CTF contests with React/Spring/MySQL/Flask/Kubernetes/Docker/Helm. It allows people to generate one container per challenge per team.

Screenshot_1400

Starting project

To start project without backend:

docker-compose up

To start with backend:

docker-compose -f docker-compose_with_backend.yml up

Backend

Starting Development

To develop backend you need to start compose without backend (docker-compose up) and then launch InteliJ. Make sure database is avaliable (docker ps) or you will not be able to build backend project.

If the project does not build

  1. Delete these files

  1. Reopen project in InteliJ

  2. And build like that

Backend config

It is stored in 2 files: pom.xml and aplication.properties

db is database name specified in both setup.sql and docker-compose.yml ports also specified in docker-compose.yml

Database

Schema modification

MySQL database schema is stored in setup.sql. To modify it you need to:

  1. shut containers down (docker stop )
  2. delete containers (docker containers prune OR docker rm )
  3. delete volumes (docker volume prune OR docker volume rm

🔴IMPORTANT Schema won't reload if you have previous database stored in named volume❗

Diagram

PHPmyadmin

There is phpmyadmin client if you want to see database without connection to the container. To log in you need to go to localhost:8081 and then fill in the form

  • Server: db
  • User: root
  • Password: password

Logging to MySQL inside container

docker exec -it <container-id> bash
mysql -u root -p [ENTER]
 password  [ENTER]
SHOW databases;
USE db;
SHOW tables;

🔴[ENTER] means clicking enter

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors