git clone git@github.com:Prime1Code/mangui.git
cd mangui
Build the React app and Spring Boot app.
gradle
and npm
are required to run the build-script.
./buildBackendAndFrontend.sh
Afterwards:
Start
your Spring Boot
app with Spring Boot profile spring.profiles.active=dev
Start
you React
app and open url localhost:3000/loginJust start the script
below. It builds the artifacts and creates a Docker environment
with
mongo
databasebackend
appfrontend
web appnginx-proxy
./createDockerImagesAndRunLocally.sh
Head over to localhost/login and use username and password from the .env
file (MONGO_INITDB_ROOT_USERNAME
and MONGO_INITDB_ROOT_PASSWORD
).
[!NOTE]
Default value for username and password isadmin
Create a directory for your Mangui app.
mkdir mangui
cd mangui
Create a folder structure like this.
The project comes with all the necessary
files in the corresponding folders.
├── mangui
│ ├── certs
│ ├── conf
│ │ └── client_max_body_size.conf
│ ├── Docker-compose-server-hub.yml
│ ├── .env
│ ├── vhost
│ │ ├── default
│ │ └── <vhost>_location
Start your Mangui app with the following CLI command
Docker-compose -f Docker-compose-server-hub.yml up --force-recreate -d
In case you are building your own frontend
and backend
artifacts and do not want to use the pre-built Docker images, follow the instructions below:
The server script createDockerImagesAndRun.sh
requires the frontend
and backend
artifacts as well es
required config files
in certain directories.
Create a folder structure that looks like this:
├── createDockerImagesAndRun.sh
├── mangui
│ ├── be
│ │ ├── build
│ │ │ └── libs
│ │ │ └── mongodb.jar
│ │ └── Dockerfile
│ ├── certs
│ ├── conf
│ │ └── client_max_body_size.conf
│ ├── Docker-compose-server.yml
│ ├── .env
│ ├── nginx_fe
│ │ ├── build
│ │ │ ├── asset-manifest.json
│ │ │ ├── favicon.png
│ │ │ ├── index.html
│ │ │ ├── ManguiLogo.png
│ │ │ ├── ManguiLogo.svg
│ │ │ ├── manifest.json
│ │ │ ├── robots.txt
│ │ │ └── static
│ │ │ ├── css
│ │ │ │ ├── main.32752f7b.css
│ │ │ │ ├── main.32752f7b.css.map
│ │ │ └── js
│ │ │ ├── main.3ca5aa77.js
│ │ │ ├── main.3ca5aa77.js.LICENSE.txt
│ │ │ ├── main.3ca5aa77.js.map
│ │ ├── Dockerfile
│ │ └── nginx.conf
│ ├── vhost
│ │ ├── default
│ │ └── <vhost>_location
[!IMPORTANT]
You have to rename the<vhost>_location
file to yourMANGUI_VHOST
orVIRTUAL_HOST
value. It contains the proxy cookie path to ensure transfer of cookies between frontend and backend.
[!NOTE]
Edit theclient_max_body_size.conf
file to set the max upload size for file imports via the web app. The size has to match the valueMANGUI_MAX_FILE_SIZE
in theDocker-compose-server.yml
file (see below).
Edit the .env
file to configure the necessary properties for the backend app and containers.
nano .env
Optionally
edit the Docker-compose-server.yml
file to configure volumes or ports if needed.
./createDockerImagesAndRun.sh