Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Latest commit

 

History

History
126 lines (72 loc) · 4.01 KB

README.md

File metadata and controls

126 lines (72 loc) · 4.01 KB

Ramblin Treks Backend

Our backend application is based around Docker. This allows for portability and scalability. Docker can be hosted by any device that can run docker, it is the only dependency.

Change Log

CHANGELOG.md

Live Instance

data-svc endpoint

path-svc endpoint

Installation Instructions Simple

Dependencies

  1. Docker
  2. docker-compose
  3. ports 9001, 9003, 5432 open

Installation Steps

  1. Install Docker be sure to follow the directions for your server operating system.

  2. Install docker-compose

  3. Pull the docker images

docker pull jasongibson274/path-svc

docker pull jasongibson274/data-svc

  1. Create a file called docker-compose.yml and then copy this into it

  2. Start the containers in the same directory type

docker-compose up

  1. Verify that all three continers are running by doing

    docker ps

Building From Source

Follow steps 1 and 2 from the simple installation

Dependencies

  1. Git
  2. Maven

Installation Steps

  1. Install Maven be sure to follow the directions for your server operating system.

  2. Install Git

  3. Move to the directory that will be used to store the code

  4. Clone the repository

git clone https://github.com/JasonGibson274/Ramblin-Treks.git

  1. Move to backend folder

cd backend

  1. Build the code

mvn clean install

  1. Build and run the Docker containers

docker-compose up -d --build

  1. Verify that all three continers are running by doing

docker ps

Troubleshooting

Docker containers fail to start

If the service does not seem like it has started type

docker ps

You should see output similiar to

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
e74089e8fc70        data-svc            "java -Djava.securit…"   24 hours ago        Up 59 seconds       0.0.0.0:9001->9001/tcp   backend_data-svc_1
4e8c4ca82494        postgres            "docker-entrypoint.s…"   24 hours ago        Up 59 seconds       0.0.0.0:5432->5432/tcp   backend_data-svc-db_1
a06c6b3ad51a        path-svc            "java '-Djava.securi…"   24 hours ago        Up About a minute   0.0.0.0:9003->9003/tcp   backend_pather_1

if you do not see all 3 containers determine which is missing and then type

docker ps -a

You should see a recently stopped docker container.

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                        PORTS                    NAMES
...
e74089e8fc70        data-svc            "java -Djava.securit…"   24 hours ago        Exited (143) 19 seconds ago                            backend_data-svc_1
...

The above shows that the data-svc has failed to start. To open the log use the following command with the correct CONTAINER ID

docker logs CONTAINER ID

docker logs e74089e8fc70

common error include

  1. Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set

This means that the service cannot connect to the postgres database, ensure that the postgres container is running

  1. Port busy or failed to bind

This error means that another process is using the port that the container wants to connect to. Stop that process and then restart the container.

Opening an issue

If you would like to open an issue on the repository go here