Skip to content

Commit

Permalink
build: job-server新增docker相关脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
jskils authored and Charles7c committed Jul 19, 2024
1 parent c57670a commit ed5594b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,22 @@ services:
depends_on:
- redis
- mysql
job-server:
build: ./job-server
restart: always
container_name: continew-admin-job-server
ports:
- '18001:18001'
- '1788:1788'
environment:
TZ: Asia/Shanghai
DB_HOST: 172.17.0.1
DB_PORT: 3306
DB_USER: 你的数据库用户名
DB_PWD: 你的数据库密码
DB_NAME: continew_admin_job
depends_on:
- mysql
nginx:
image: nginx:1.25.3
restart: always
Expand Down
14 changes: 14 additions & 0 deletions docker/job-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM openjdk:17

MAINTAINER Charles7c charles7c@126.com

ARG JAR_FILE=*.jar
COPY ${JAR_FILE} /app/bin/app.jar
WORKDIR /app/bin

ENTRYPOINT ["java", \
"-jar", \
"-XX:+UseZGC", \
"-Djava.security.egd=file:/dev/./urandom", \
"-Dspring.profiles.active=prod", \
"app.jar"]

0 comments on commit ed5594b

Please sign in to comment.