🐳 添加 docker 配置.

This commit is contained in:
lijiahangmax
2024-02-25 17:44:21 +08:00
parent 115ed7e6c5
commit c3f33e7494
9 changed files with 28 additions and 19 deletions

View File

@@ -1,5 +1,10 @@
FROM nginx:alpine
USER root
RUN \
echo "" > /etc/apk/repositories && \
echo "http://mirrors.aliyun.com/alpine/v3.8/main" >> /etc/apk/repositories &&\
echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories && \
apk update
RUN apk add openjdk8
RUN rm -rf /etc/nginx/conf.d/*
WORKDIR /app

View File

@@ -1,4 +1,4 @@
#!/bin/bash
nginx
cd /app
java -jar app.jar --spring.profiles.active=prod
nohup java -jar app.jar --spring.profiles.active=prod 2>&1 &
nginx -g 'daemon off;'