Skip to content

Commit d660dd1

Browse files
Add Dockerfile and docker-compose yml configuration.
1 parent 0586d5f commit d660dd1

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM openjdk:17-alpine
2+
ENV directory /app/
3+
WORKDIR ${directory}
4+
ADD build/distributions/website-backend-shadow-*.zip .
5+
RUN unzip -q -o *.zip
6+
RUN rm -fv *.zip
7+
RUN mv website-backend-shadow*/* .
8+
RUN rm -rf website-backend-shadow*/
9+
WORKDIR bin
10+
EXPOSE 8081:8081
11+
ENTRYPOINT ./website-backend

docker-compose.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: "3.9"
2+
3+
services:
4+
mongod:
5+
image: mongo
6+
restart: unless-stopped
7+
container_name: mongodb
8+
ports:
9+
- "27017:27017"
10+
networks:
11+
- backend
12+
deploy:
13+
resources:
14+
limits:
15+
cpus: "0.1"
16+
app:
17+
build: ./
18+
container_name: website-backend
19+
expose:
20+
- 8081
21+
ports:
22+
- "8081:8081"
23+
networks:
24+
- backend
25+
deploy:
26+
resources:
27+
limits:
28+
cpus: "0.1"
29+
30+
networks:
31+
backend:
32+
driver: bridge

0 commit comments

Comments
 (0)