Hurricane
Hurricane

Reputation: 1544

JHipster - Using docker-compose on remote server

I would like to setup my JHipster project on a remote server utilising docker-compose as per here.

Am I right in thinking (for the simplest approach), these are the steps I might follow:

Thanks for your help.

Also any suggestions on how this process may be improved would be appreciated.

Upvotes: 0

Views: 627

Answers (1)

Jinna Baalu
Jinna Baalu

Reputation: 7809

Expecting that your server is Ubunutu, SSH to your server,

Install docker, docker-compose, install JAVA and set JAVA_HOME

Two approches

  1. create docker image and push it to docker hub if you have docker hub account
  2. create docker image within server

Second approch would be better to reduce the confusion

Clone your repo to server

cd <APPLICATION_FOLDER>

Do

./mvnw package -Pprod docker:build -DskipTests

List the images created

docker images

You can ignore -DskipTests , if you are writing test code.

Do

docker-compose -f /src/main/docker/app.yml up -d

List containers running

docker ps -a

Logs of the container

docker logs <CONTAINER_ID>

Upvotes: 1

Related Questions