Notes and changes for deploying to different environments.

This commit is contained in:
michaelpede 2021-10-26 15:36:30 -07:00
parent 86f6d28044
commit 2171cd60a7
6 changed files with 39 additions and 4 deletions

View File

@ -1,5 +1,5 @@
FROM tomcat:9
#FROM tomcat:latest
#FROM tomcat:latest # latest stopped working, Nov 2021
ENV JPDA_ADDRESS="*:8000"
ENV JPDA_TRANSPORT="dt_socket"

View File

@ -31,3 +31,27 @@ You will need to configure the following environment variables, so the server ca
* SQL_HOST
* SQL_USER
* SQL_PASSWORD
## ENVIRNONMENT SPECIFIC NOTES
The build scripts were moved to take place in a Docker container so that they would work consistently across environments.
### Windows
In Windows, running under a Bash shell will work, assuming you meet the above requirements.
Don't forget to have Docker installed for Windows.
There is an `env-default-windows` file you should rename to `.env` before running the build script.
The `docker/docker-builder` file has a line commented out for Windows users.
### MAC
This has not been tested. Anyone wanting to give feedback would be appreciated.
## BUILD FAILURES
In the case this happens, and you have fixed the source of the error and need to rebuild everything using the build scripts, you should delete any prior Docker containers.
## Customizing your setup
You can have your own SQL database. Just copy the `env-default` file to `.env` and modify the appropriate properties.

View File

@ -10,6 +10,9 @@ then
cp "${HOME_DIR}/env-default" "${HOME_DIR}/.env"
fi
#Needed for Linux builds
chmod a+x "${HOME_DIR}/docker/scripts/*"
docker build -t reso-builder -f docker/docker-builder .
docker run --name builder --mount type=bind,source="${HOME_DIR}",target=/usr/src/app -t reso-builder

View File

@ -4,6 +4,7 @@ WORKDIR /usr/src/app
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y wget openjdk-8-jdk curl pip maven docker-compose
RUN update-java-alternatives -s java-1.8.0-openjdk-amd64
# Needed for Windows builds
#RUN update-java-alternatives -s java-1.8.0-openjdk-amd64
CMD ./docker/scripts/build.sh

View File

@ -1,8 +1,7 @@
COMPOSE_FILE=docker-compose.yml;./optional/docker-db-compose.yml
COMPOSE_FILE=docker-compose.yml:./optional/docker-db-compose.yml
SQL_HOST=docker-mysql
SQL_USER=root
SQL_PASSWORD=root
SQL_DB_DRIVER=com.mysql.cj.jdbc.Driver
SQL_CONNECTION_STR=jdbc:mysql://docker-mysql/reso_data_dictionary_1_7?autoReconnect=true&maxReconnects=4
#&user=root&password=root
CERT_REPORT_FILENAME=RESODataDictionary-1.7.metadata-report.json

8
env-default-windows Normal file
View File

@ -0,0 +1,8 @@
#Composer file needs a specific separator on Windows.
COMPOSE_FILE=docker-compose.yml;./optional/docker-db-compose.yml
SQL_HOST=docker-mysql
SQL_USER=root
SQL_PASSWORD=root
SQL_DB_DRIVER=com.mysql.cj.jdbc.Driver
SQL_CONNECTION_STR=jdbc:mysql://docker-mysql/reso_data_dictionary_1_7?autoReconnect=true&maxReconnects=4
CERT_REPORT_FILENAME=RESODataDictionary-1.7.metadata-report.json