Docker implementation
This commit is contained in:
5
Dockerfile
Normal file
5
Dockerfile
Normal file
@@ -0,0 +1,5 @@
|
||||
FROM bellsoft/liberica-openjdk-alpine
|
||||
EXPOSE 8889
|
||||
RUN mkdir -p /app/
|
||||
ADD build/libs/webquizengine.jar /app/webquizengine.jar
|
||||
ENTRYPOINT ["java", "-jar", "/app/webquizengine.jar"]
|
||||
@@ -1,5 +1,7 @@
|
||||
# WebQuizEngine
|
||||
Spring Boot web service to create and solve quizzes using a REST API.
|
||||
Spring Boot web service to create and solve quizzes via REST API using Docker as deployment tool.
|
||||
|
||||

|
||||
## Register user
|
||||
To register a new user send a JSON with `email` and `password` via `POST` request to `/api/register`:
|
||||
``` json
|
||||
|
||||
@@ -7,6 +7,15 @@ apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
sourceCompatibility = '11'
|
||||
|
||||
task fullJar(type: Jar) {
|
||||
manifest {
|
||||
attributes 'Implementation-Title': 'WebQuizEngine Jar File',
|
||||
'Main-Class': 'org.hyperskill.webquiz.engine.WebQuizEngine'
|
||||
}
|
||||
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||
with jar
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
15
docker-compose.yml
Normal file
15
docker-compose.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
# Docker Compose file Reference (https://docs.docker.com/compose/compose-file/)
|
||||
|
||||
version: '3.8'
|
||||
|
||||
# Define services
|
||||
services:
|
||||
# Engine service
|
||||
engine:
|
||||
# Configuration for building the docker image for the engine service
|
||||
build:
|
||||
context: ./ # Use an image built from the specified dockerfile in the root directory.
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "8889:8889" # Forward the exposed port 8889 on the container to port 8889 on the host machine
|
||||
restart: always
|
||||
BIN
src/main/resources/banner.png
Normal file
BIN
src/main/resources/banner.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
Reference in New Issue
Block a user