Skip to content

Commit

Permalink
fix: 优化 docker 配置
Browse files Browse the repository at this point in the history
  • Loading branch information
CaoMeiYouRen committed Oct 7, 2023
1 parent ba600ee commit caf1a6c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
15 changes: 14 additions & 1 deletion templates/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ services:
# MONGODB_PASSWORD: "123456"
# REDIS_HOST: "redis"
# REDIS_PORT: 6379

# depends_on:
# - redis
# - mongo
# - mysql
# mongo:
# image: mongo:4.2
# restart: always
Expand All @@ -35,6 +38,16 @@ services:
# restart: always
# volumes:
# - redis-data:/data
# mysql:
# image: mysql:8
# restart: always
# environment:
# MYSQL_ROOT_PASSWORD: "root"
# MYSQL_ROOT_HOST: "%"
# MYSQL_DATABASE: "test"
# volumes:
# - mysql-data:/data
# volumes:
# mongo-data:
# redis-data:
# mysql-data:
4 changes: 2 additions & 2 deletions templates/java/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ RUN echo "http://mirrors.aliyun.com/alpine/edge/main/" > /etc/apk/repositories \

WORKDIR /home/app

COPY . /home/app
COPY ./target/main.jar /home/app

EXPOSE 8080

CMD ["java", "-jar","./target/main.jar"]
CMD ["java", "-jar", "main.jar"]

0 comments on commit caf1a6c

Please sign in to comment.