diff --git a/.dockerignore b/.dockerignore index 1475abe5fd5691ad328313658a63f40f28ee11ff..3f217b8cb16ba49ee96f38b7b2c6d234f782e4c0 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,8 @@ * +!*default.conf !target/*-runner !target/*-runner.jar !target/lib/* !target/quarkus-app/* !config/nginx/* -!src/main/www/build/* \ No newline at end of file +!src/main/www/build/* diff --git a/.gitignore b/.gitignore index 1ead873cb92202c8068a800fe06ccf73c4d992c0..002f8086afa86b954e75014778ff9d179fc6de6c 100644 --- a/.gitignore +++ b/.gitignore @@ -49,7 +49,6 @@ release.properties .project .classpath .settings/ -bin/ # IntelliJ .idea diff --git a/Jenkinsfile.www b/Jenkinsfile.www new file mode 100644 index 0000000000000000000000000000000000000000..722505cb8f6a4cc1e8a1bec1850cd2ca3cc797a4 --- /dev/null +++ b/Jenkinsfile.www @@ -0,0 +1,11 @@ +@Library('releng-pipeline') _ + +hugo ( + appName: 'membership-www-preview.eclipse.org', + productionBranchName: "do-not-deploy-production", + productionDomain: 'membership-www-preview.eclipse.org', + build: [ + script: 'bin/build.sh', + destinationFolder: 'src/main/www/build' + ] +) diff --git a/README.md b/README.md index d4bbe1b0f868f605c5e8e572f6b18bae2134fc76..f35c7a10d7cd9f8734ac90428d51a02bb8d2efa3 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,7 @@ # react-eclipsefdn-members -[![Netlify Status](https://api.netlify.com/api/v1/badges/b0087dce-17ae-46f6-bbea-b3813d35be3f/deploy-status)](https://app.netlify.com/sites/eclipsefdn-react-members/deploys) - Supported by our member organizations, the Eclipse Foundation provides our community with Intellectual Property, Mentorship, Marketing, Event and IT Services. - - [Getting Started](#getting-started) - [CSRF and API Security](#csrf-and-api-security) @@ -72,7 +69,7 @@ Additionally, when requesting any PII/form data, a CSRF token will need to be pa #### Environment and properties -This setup assumes that the users developing for this application are employees of Eclipse Foundation with access to internal tooling and servers. If you do not have access to these resources, manual installation and setups will be required. To do initial setup, run `make setup` in the root of the directory project. This will fetch the missing SQL needed for DB initialization as well as start up the database with all of the needed tables for running the application. +This setup assumes that the users developing for this application are employees of Eclipse Foundation with access to internal tooling and servers. If you do not have access to these resources, manual installation and setups will be required. To do initial setup, run `make setup` in the root of the directory project. This will fetch the missing SQL needed for DB initialization as well as start up the database with all of the needed tables for running the application. Once initial setup is done, retrieve the secrets in the Webdev collection in BitWarden related to this service. They follow the naming pattern of `membership-*-dev-secrets`, where the star is replaced by the service the secrets are used for. These dev secrets will bind to the dockerized MariaDB mentioned in the previous step as well as the EF Keycloak instance, connecting to the staging realms (separate from production assets). These secrets should be placed under `./config/*/secret.properties`, where the star is the service folder in the BitWarden secret name. This needs to be done before starting the actual services as otherwise Docker will create folders with incorrect permissions and need to be manually fixed. Additionally, if the mariadb password has been changed from default, replace the `quarkus.datasource.password` and `quarkus.datasource.*.password` values with the local password value. This can be retrieved by using `echo $MARIADB_PASSWORD` in the terminal if you're unsure. @@ -128,7 +125,7 @@ Linux / MacOS: /etc/hosts [^ Top](#react-eclipsefdn-members) ### MariaDB setup -The base definitions of the tables as required for the connection of this API are defined under `./application/src/main/resources/sql/rem_ddl.sql`, `./portal/src/main/resources/sql/eclipsedb_ddl.sql`, `./portal/src/main/resources/sql/dashboard_ddl.sql`, and a final file from the FoundationDB API (TODO). These should all be added present in the MariaDB instance to support this API. +The base definitions of the tables as required for the connection of this API are defined under `./application/src/main/resources/sql/rem_ddl.sql`, `./portal/src/main/resources/sql/eclipsedb_ddl.sql`, `./portal/src/main/resources/sql/dashboard_ddl.sql`, and a final file from the FoundationDB API (TODO). These should all be added present in the MariaDB instance to support this API. ### Keycloak Setup diff --git a/bin/build.sh b/bin/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..3e085ae5a6967687a3557f2a0ffa6e9dd8b58ecd --- /dev/null +++ b/bin/build.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# =========================================================================== +# Copyright (c) 2021 Eclipse Foundation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Christopher Guindon (Eclipse Foundation) +# ========================================================================== + +set -euo pipefail + +yarn --cwd src/main/www install --frozen-lockfile +yarn --cwd src/main/www build diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index 8b1605fda930ff0f48d9c4e20c3ec8e3f107b073..0000000000000000000000000000000000000000 --- a/netlify.toml +++ /dev/null @@ -1,4 +0,0 @@ -[build] - base = "src/main/www" - command = "rm -rf node_modules && yarn --frozen-lockfile && yarn build" - publish = "build" \ No newline at end of file