Tweaking scripts for Windows build
Windows is not expected to be a large target environment, but nice to have for a development test server.
This commit is contained in:
parent
953baf5a64
commit
efccb76206
|
@ -42,7 +42,7 @@ 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.
|
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.
|
The `docker/docker-builder` file has a line commented out for Windows users, and a line that needs to be commented out.
|
||||||
|
|
||||||
### MAC
|
### MAC
|
||||||
|
|
||||||
|
|
2
build.sh
2
build.sh
|
@ -11,7 +11,7 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Needed for Linux builds
|
#Needed for Linux builds
|
||||||
chmod a+x "${HOME_DIR}/docker/scripts/*"
|
chmod a+x ./docker/scripts/*
|
||||||
|
|
||||||
docker build -t reso-builder -f docker/docker-builder .
|
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
|
docker run --name builder --mount type=bind,source="${HOME_DIR}",target=/usr/src/app -t reso-builder
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
FROM ubuntu:20.10
|
FROM ubuntu:20.10
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
# Comment next line out for Windows builds
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
RUN apt-get update && apt-get install -y wget openjdk-8-jdk curl pip maven docker-compose
|
RUN apt-get update && apt-get install -y wget openjdk-8-jdk curl pip maven docker-compose
|
||||||
|
|
||||||
# Needed for Windows builds
|
# Needed for Windows builds
|
||||||
#RUN update-java-alternatives -s java-1.8.0-openjdk-amd64
|
#RUN update-java-alternatives -s java-1.8.0-openjdk-amd64
|
||||||
|
|
||||||
CMD ./docker/scripts/build.sh
|
CMD sh /usr/src/app/docker/scripts/build.sh
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
REAL_VAR0=`readlink -f $0`
|
|
||||||
HOME_DIR_OLD=`dirname ${REAL_VAR0}`
|
|
||||||
HOME_DIR=/usr/src/app
|
HOME_DIR=/usr/src/app
|
||||||
|
cd "${HOME_DIR}"
|
||||||
TEMP_DIR="${HOME_DIR}/temp"
|
TEMP_DIR="${HOME_DIR}/temp"
|
||||||
SQL_DIR="${HOME_DIR}/sql"
|
SQL_DIR="${HOME_DIR}/sql"
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,10 @@ import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
import org.reso.service.servlet.RESOservlet;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
|
||||||
public class DefinitionBuilder
|
public class DefinitionBuilder
|
||||||
{
|
{
|
||||||
|
@ -31,6 +35,8 @@ public class DefinitionBuilder
|
||||||
new AbstractMap.SimpleEntry<>("version", true))
|
new AbstractMap.SimpleEntry<>("version", true))
|
||||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||||
|
|
||||||
|
private static final Logger LOG = LoggerFactory.getLogger(DefinitionBuilder.class);
|
||||||
|
|
||||||
// Internals
|
// Internals
|
||||||
private final String fileName;
|
private final String fileName;
|
||||||
private JsonReader reader;
|
private JsonReader reader;
|
||||||
|
@ -50,6 +56,7 @@ public class DefinitionBuilder
|
||||||
}
|
}
|
||||||
catch (FileNotFoundException e)
|
catch (FileNotFoundException e)
|
||||||
{
|
{
|
||||||
|
LOG.info("ERROR:",e.getMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue