-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (26 loc) · 975 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Use an official OpenJDK runtime as a parent image
FROM openjdk:11-jre-slim
# Set the working directory in the container
WORKDIR /app
# Copy the JAR file from your target directory to the working directory in the container
COPY ./target/Dictator-0.1-ALPHA.jar /app/dictator-game.jar
# Environment variables for the board
ENV BOARD_DEFAULT_WIDTH=30
ENV BOARD_DEFAULT_HEIGHT=30
ENV BOARD_DEFAULT_COIN_PROBABILITY=0.20
ENV BOARD_DEFAULT_TOTAL_COINS=10000
ENV BOARD_DEFAULT_MIN_COINS_PER_TILE=10
ENV BOARD_DEFAULT_MAX_COINS_PER_TILE=80
# Environment variables for the DB
ENV SPRING_DATA_MONGODB_URI=mongodb://localhost:27017/dictator
ENV SPRING_DATA_MONGODB_DATABASE=dictator
# Environment variables for the server port
ENV SERVER_PORT=9000
# Environment variables for JWT
ENV JWT_BASE64_SECRET=c2VjcmV0
ENV JWT_SECRET=secret
ENV JWT_EXPIRATION=86400
# Expose the port the app runs on
EXPOSE 9000
# Run the JAR file
ENTRYPOINT ["java", "-jar", "/app/dictator-game.jar"]