Skip to content
Snippets Groups Projects
Commit 3d684f1d authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

The Dockerfile now works as expected

parent af73e198
Branches
No related tags found
No related merge requests found
# Since we are including resources from the parent folder, # Since we are including resources from the parent folder,
# this Dockerfile has to be executed from the project's parent folder, like this: # this Dockerfile has to be executed from the project's parent folder, like this:
# sudo docker build --tag vips/logic:TEST01 -f VIPSLocic/Dockerfile . # sudo docker build --tag vips/logic:TEST01 -f VIPSLogic/Dockerfile .
## Challenge: database connection to "localhost" ?? IP address? What?? :-)
# the first stage of our build will use a maven 3.6 parent image # the first stage of our build will use a maven 3.6 parent image
FROM maven:3.6-openjdk-11 AS MAVEN_BUILD FROM maven:3.6-openjdk-11 AS MAVEN_BUILD
...@@ -51,7 +53,7 @@ RUN echo '<?xml version="1.0" encoding="UTF-8"?>\ ...@@ -51,7 +53,7 @@ RUN echo '<?xml version="1.0" encoding="UTF-8"?>\
<module xmlns="urn:jboss:module:1.0" name="org.postgresql">\ <module xmlns="urn:jboss:module:1.0" name="org.postgresql">\
<resources>\ <resources>\
<resource-root path="postgresql-42.2.18.jar"/>\ <resource-root path="postgresql-42.2.18.jar"/>\
<resource-root path="postgis-jdbc-2.1.0.jar"/>\ <resource-root path="postgis-jdbc-2.2.2.jar"/>\
</resources>\ </resources>\
<dependencies>\ <dependencies>\
<module name="javax.api"/>\ <module name="javax.api"/>\
......
# Building VIPSLogic # Building VIPSLogic
## But first: A deployment note
Whether you deploy using Docker or Wildfly (or another JEE server), the context path of the app is always /VIPSLogic. However, the app is designed to be accessible at the root level. So you always need to proxy it behind e.g. Apache or Nginx. Here's an example vhost for Apache:
```
<VirtualHost *:80>
ServerName vipslogic-local.no
AddDefaultCharset UTF-8
ProxyPass / http://localhost:18080/VIPSLogic/
ProxyPassReverse / http://localhost:18080/VIPSLogic/
ProxyPassReverseCookiePath /VIPSLogic /
</VirtualHost>
```
## Docker ## Docker
### Contents of standalone.xml ### Building
You need the
Make sure you're located in the parent folder of the VIPSLogic project. You need these resource files/folders in your current folder:
* standalone.xml (see below)
* VIPSCommon/ (can be cloned [from here](https://gitlab.nibio.no/VIPS/VIPSCommon))
Run
`sudo docker build --tag vips/logic:TEST01 -f VIPSLogic/Dockerfile .`
#### Contents of standalone.xml
VIPSLogic is using system properties for instance specific settings. In Wildfly (JBoss), these can be provided VIPSLogic is using system properties for instance specific settings. In Wildfly (JBoss), these can be provided
in the standalone.xml file. Examples for this is available in the `wildfly_config_examples/` folder. in the standalone.xml file. Examples for this is available in the `wildfly_config_examples/` folder.
\ No newline at end of file
### Running
`sudo docker run --publish 18080:8080 --add-host=vipslogicdb:[YOUR_HOSTS_IP_ADDRESS] --detach --name vipslogic vips/logic:TEST01`
### Troubleshooting by logging in
`sudo docker exec -it <containername> bash`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment