context copy

main
xingzi 2 years ago
parent e0fcd9f59c
commit 5561abb619

@ -3,14 +3,10 @@ version: "3"
services: services:
frontend: frontend:
build: build:
context: ./docker context: .
dockerfile: Dockerfile dockerfile: ./docker/Dockerfile
image: eladmin-frontend:latest image: eladmin-frontend:latest
container_name: eladmin-frontend container_name: eladmin-frontend
command: ["cp", "./dist", "/usr/share/nginx/html"] # restart: always
restart: always
ports: ports:
- "8282:80" - "8282:80"
volumes:
# - ./docker/conf/conf.d:/etc/nginx/conf.d
# - ./dist:/usr/share/nginx/html

@ -1,5 +1,8 @@
FROM nginx:1.12 FROM nginx:1.12
# set timezome
ENV TZ=Asia/Shanghai ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY ./docker/conf/nginx.conf /etc/nginx/nginx.conf
COPY ./docker/conf/conf.d/default.conf /etc/nginx/conf.d/default.conf
COPY ./dist /var/www/html
Loading…
Cancel
Save