fix(doc) caddy dockerfile

approve-sys
bob 2 years ago
parent b18db95031
commit d677034ac8

@ -0,0 +1,10 @@
:8300, localhost {
root * /data/dist
handle_path /stage-api/* {
rewrite * /{path}
# 需要代理到的IP以及端口号
reverse_proxy ruoyi-admin:8080
}
file_server
}

@ -0,0 +1,26 @@
version: '3.8'
services:
caddy:
image: mritd/caddy
container_name: caddy
restart: always
networks:
- caddynetwork
environment:
TZ: Asia/Shanghai
volumes:
# - /etc/localtime:/etc/localtime:ro
- ./conf:/etc/caddy
- config:/config
- data:/data
ports:
- "80:80"
- "8300:8300"
- "443:443"
- "443:443/udp"
networks:
caddynetwork:
name: caddynetwork
volumes:
config:
data:

@ -0,0 +1,11 @@
FROM mritd/openjdk8
WORKDIR /javarun
ARG SPRING_PROFILE
ENV JAVA_OPTS "${JAVA_OPTS} ${CUSTOM_OPTS}"
COPY target/*.jar /javarun
CMD ["bash","-c","java ${JAVA_OPTS} -Dspring.profiles.active=${SPRING_PROFILE} -jar /javarun/*.jar"]

@ -0,0 +1,22 @@
version: '3.9'
services:
dev-web:
image: ruoyi-admin
container_name: ruoyi-admin
restart: always
networks:
- caddynetwork
environment:
TZ: Asia/Shanghai
SPRING_PROFILE: prod
volumes:
- /etc/localtime:/etc/localtime:ro
- logs:/javarun/logs
ports:
- "8082:8082"
volumes:
logs:
external: true
networks:
caddynetwork:
name: caddynetwork
Loading…
Cancel
Save