Commit 72ca8b65 by flyxiaozhu

添加 docker-compose.yml

parent 94f7bc70
Showing with 15 additions and 2 deletions
...@@ -5,4 +5,4 @@ RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ ...@@ -5,4 +5,4 @@ RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
ADD target/original-erp-admin-api-1.0-SNAPSHOT.jar app.jar ADD target/original-erp-admin-api-1.0-SNAPSHOT.jar app.jar
ENTRYPOINT ["sh","-c","java -jar /app.jar --spring.profiles.active=prod"] ENTRYPOINT ["sh","-c","java -jar /app.jar"]
\ No newline at end of file \ No newline at end of file
version: '2'
services:
eureka-server-1:
build: ./admin-api/
image: erp-module
restart: always # 总是重启
ports:
- "8080:8081"
expose: # 暴露端口,只提供容器间访问,不暴露给主机
- "8081"
environment: # 环境变量
SPRING_PROFILES_ACTIVE: prod # 自定义参数用于给服务的配置文件传递参数
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment