New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Docker image #1

Open
nathanweeks opened this Issue Feb 7, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@nathanweeks
Copy link

nathanweeks commented Feb 7, 2019

It would be convenient for consistent deployment on Windows, Mac, Linux, and production servers to provide an official gigwa Docker image. I cobbled together the following example; there is room for improvement (e.g., it would be better for the Dockerfile to first build from source as part of a multi-stage build):

Example Dockerfile

FROM tomcat:8.5-alpine

RUN wget http://southgreen.fr/sites/southgreen.fr/files/uploads/gigwa_releases/Gigwa_V2.0-RC2_Webapp.zip && \
    unzip Gigwa_V2.0-RC2_Webapp.zip && \
    sed -i.orig '/defaultMongoHost/s/127.0.0.1/mongo/' \
        Gigwa_V2.0-RC2_Webapp/gigwa/WEB-INF/classes/applicationContext-data.xml && \
    mv Gigwa_V2.0-RC2_Webapp/gigwa /usr/local/tomcat/webapps && \
    rm -rf Gigwa_V2.0-RC2_Webapp Gigwa_V2.0-RC2_Webapp.zip

Example docker-compose.yml:

version: '3.7'

services:
  tomcat:
    image: gigwa:2.0-RC2
    ports:
      - 8080:8080
    links:
      - mongo
    restart: always
    
  mongo:
    image: mongo:4.0
    restart: always
    command: --slowms 60000 --storageEngine wiredTiger --wiredTigerCollectionBlockCompressor=zlib
    expose:
      - 27017

volumes:
  mongo:

Build docker image & start:

$ docker build -t gigwa:2.0-RC2 .
...
$ docker-compose up

Gigwa is then available at http://localhost:8080/gigwa

@GuilhemSempere

This comment has been minimized.

Copy link
Collaborator

GuilhemSempere commented Feb 8, 2019

Many thanks for this excellent initiative. I will mention it in the Gigwa homepage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment