docker部署

This commit is contained in:
阿沐 2022-10-08 23:31:01 +08:00
parent 438d7c4962
commit 90e044fc20
2 changed files with 22 additions and 0 deletions

11
deploy/Dockerfile Normal file
View File

@ -0,0 +1,11 @@
# 构建镜像执行命令【docker build -t makunet:1.0 .】
FROM openjdk:8u212-jre
MAINTAINER 阿沐
# 设置时区
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone
ENTRYPOINT ["java", "-server", "-Xms1024M", "-Xmx1024M", "-Djava.security.egd=file:/dev/./urandom", "-Dfile.encoding=UTF-8", "-XX:+HeapDumpOnOutOfMemoryError", "-jar", "/app/app.jar" ]

11
deploy/docker-compose.yml Normal file
View File

@ -0,0 +1,11 @@
version: '3.9'
services:
maku-boot:
image: makunet:1.0
container_name: maku-boot
ports:
- 8080:8080
environment:
- spring.profiles.active=prod
volumes:
- /work/www/maku-boot/maku-server.jar:/app/app.jar