diff --git a/.gitignore b/.gitignore index a471ec23..e079c5fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -HELP.md target/ !.mvn/wrapper/maven-wrapper.jar !**/src/main/** @@ -6,7 +5,7 @@ target/ node_modules node.exe dist -src/main/frontend/node +node ### STS ### .apt_generated diff --git a/README.md b/README.md index 705b5a85..94b2ecc5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,36 @@ # Hangar2 - Ore, but in spring! -Nothing to see here yet, move along +This is the repository for Hangar, a plugin repository used for paper plugins and similar pieces of software. + +Hangar is a "fork" of [Ore](https://github.com/SpongePowered/Ore), created by the Sponge project, +but rebuild from the group up using the Spring Boot Framework in Java, using the Freemarker templating engine. +We would like the thank all Ore contributors, without them, this project would never have been possible. + +The frontend is a mixture of vue and jquery, which will be cleaned up eventually. + +There may or may not be a staging instance running at https://hangar-new.minidigger.me. +It may or may not allow you to log in, please don't create too much of a mess so that I don't always need to nuke the DB when I want to use it. + +## Building + +The project uses maven and should be straight forward (we even include a wrapper for you, wow!) +The frontend is located in `src/main/frontend` and uses webpack. You will need yarn to build that. Initially install dependencies via `yarn`, then start the dev environment using `yarn run serve`. + +Additionally, you will need a postgresql database. For your convenice, this repo contains a dev-db docker compose stack in the docker folder that will get you setup. + +This project currently uses java 11. + +## Deployment + +Deployment happens via docker, checkout the stack in the docker folder. You will want to modify the application.properties in the hangar folder. + +## Contributing + +There is a bunch of stuff to do, some of that is noted in the [status](STATUS.md) and [to-port](TO-PORT.md) files. +Your best bet is joining the [discord](https://s.minidigger.me/discord) and just discussing with us. +All contributions are very welcome, I will not be able to finish this alone! + +## Licence + +Most of the frontend is a fork of Ore, licensed under MIT [here](https://github.com/SpongePowered/Ore/blob/staging/LICENSE.txt). +The rest is new code (but created in reference of Ore) and is licenced under the MIT licence too. diff --git a/STATUS.md b/STATUS.md index 7ee6f3f0..2ee07fc8 100644 --- a/STATUS.md +++ b/STATUS.md @@ -2,20 +2,20 @@ ## stuff to do -* port all templates - * enable user dropdown in templates - * config stuff for templates - * fix alerts -* figure out messages -* figure out database -* figure out internal api +* fix all templates +* make all pages use the db for data +* implement internal api * implement external api -* csrf stuff -* dev server for frontend +* better config handling ### stuff that is done * model external api * implement plugin file detection shit -* kinda port templates (the first ones anyways) +* kinda port templates (majority of stuff is done) * add frontend (which actually builds) +* csrf stuff +* figure out messages +* figure out database +* dev server for frontend +* fix alerts diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 64db98f9..35ceb5d3 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -15,7 +15,7 @@ services: labels: - "traefik.enable=true" - "traefik.http.services.hangar.loadbalancer.server.port=8080" - - "traefik.http.routers.hangar.rule=Host(`hangar.minidigger.me`)" + - "traefik.http.routers.hangar.rule=Host(`hangar-new.minidigger.me`)" - "traefik.http.routers.hangar.entrypoints=web-secure" - "traefik.http.routers.hangar.tls=true" - "traefik.http.routers.hangar.tls.options=default" @@ -31,26 +31,26 @@ services: POSTGRES_PASSWORD: 'hangar' POSTGRES_DB: hangar ports: - - "5432:5432" + - "5432:5432" # pls dont abuse open port :/ volumes: - db_data:/var/lib/postgresql/data networks: - web - mail: - image: mailhog/mailhog:latest - labels: - - "traefik.enable=true" - - "traefik.http.services.hangar-mail.loadbalancer.server.port=8025" - - "traefik.http.routers.hangar-mail.middlewares=basicauth@file" - - "traefik.http.routers.hangar-mail.rule=Host(`hangar-mail.minidigger.me`)" - - "traefik.http.routers.hangar-mail.entrypoints=web-secure" - - "traefik.http.routers.hangar-mail.tls=true" - - "traefik.http.routers.hangar-mail.tls.options=default" - - "traefik.http.routers.hangar-mail.tls.certresolver=default" - - "traefik.http.routers.hangar-mail.tls.domains[0].main=minidigger.me" - - "traefik.http.routers.hangar-mail.tls.domains[0].sans=*.minidigger.me" - networks: - - web +# mail: +# image: mailhog/mailhog:latest +# labels: +# - "traefik.enable=true" +# - "traefik.http.services.hangar-mail.loadbalancer.server.port=8025" +# - "traefik.http.routers.hangar-mail.middlewares=basicauth@file" +# - "traefik.http.routers.hangar-mail.rule=Host(`hangar-mail.minidigger.me`)" +# - "traefik.http.routers.hangar-mail.entrypoints=web-secure" +# - "traefik.http.routers.hangar-mail.tls=true" +# - "traefik.http.routers.hangar-mail.tls.options=default" +# - "traefik.http.routers.hangar-mail.tls.certresolver=default" +# - "traefik.http.routers.hangar-mail.tls.domains[0].main=minidigger.me" +# - "traefik.http.routers.hangar-mail.tls.domains[0].sans=*.minidigger.me" +# networks: +# - web # auth: # image: registry.gitlab.com/minidigger/hangarauth # depends_on: diff --git a/docker/hangar/application.properties b/docker/hangar/application.properties index 86e72b13..945ad76a 100644 --- a/docker/hangar/application.properties +++ b/docker/hangar/application.properties @@ -1,14 +1,13 @@ -########### -# General # -########### -server.port=8080 -spring.freemarker.request-context-attribute=rc - ############ # DataBase # ############ -spring.jpa.database=POSTGRESQL -spring.datasource.platform=postgres spring.datasource.url=jdbc:postgresql://db:5432/hangar -spring.datasource.username=root -spring.datasource.password=changeme +spring.datasource.username=hangar +spring.datasource.password=hangar + +############# +# Fake User # +############# + +fakeUser.enabled=true +hangar.debug=true