add docker-compose and Dockerfile
parent
897fdf5be6
commit
f4ab8147c6
@ -0,0 +1,5 @@
|
|||||||
|
FROM gradle:6.8.1-jdk8
|
||||||
|
COPY . /home/gradle/project
|
||||||
|
WORKDIR /home/gradle/project
|
||||||
|
RUN gradle build
|
||||||
|
CMD ["java -jar ./build/libs/RandomRedditMemesAPI.jar"]
|
@ -0,0 +1,11 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
api:
|
||||||
|
image: library/openjdk:8-alpine
|
||||||
|
volumes:
|
||||||
|
- ./:/home/gradle/project
|
||||||
|
working_dir: /home/gradle/project
|
||||||
|
command: sh -c 'java -jar ./build/libs/RandomRedditMemesAPI.jar'
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
restart: always
|
@ -0,0 +1,8 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
api:
|
||||||
|
build: ../
|
||||||
|
container_name: RandomRedditMemesAPI
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
restart: always
|
Loading…
Reference in New Issue