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.
- Docker
- docker-compose
- ports 9001, 9003, 5432 open
-
Install Docker be sure to follow the directions for your server operating system.
-
Pull the docker images
docker pull jasongibson274/path-svc
docker pull jasongibson274/data-svc
-
Create a file called docker-compose.yml and then copy this into it
-
Start the containers in the same directory type
docker-compose up
-
Verify that all three continers are running by doing
docker ps
Follow steps 1 and 2 from the simple installation
- Git
- Maven
-
Install Maven be sure to follow the directions for your server operating system.
-
Move to the directory that will be used to store the code
-
Clone the repository
git clone https://github.com/JasonGibson274/Ramblin-Treks.git
- Move to backend folder
cd backend
- Build the code
mvn clean install
- Build and run the Docker containers
docker-compose up -d --build
- Verify that all three continers are running by doing
docker ps
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
- 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
- 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