refactor: docker setup
parent
ae01f61374
commit
533793a09a
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<link rel="icon" href="favicon.ico">
|
||||
<title>HETIC vs EEMI</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -14,4 +14,5 @@
|
|||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
<script src="build.js"></script>
|
||||
</html>
|
||||
|
|
|
@ -5,7 +5,7 @@ services:
|
|||
container_name: hve_client
|
||||
restart: on-failure
|
||||
build:
|
||||
context: .
|
||||
context: ./client
|
||||
dockerfile: ./Dockerfile
|
||||
volumes:
|
||||
- ./client/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
|
@ -13,7 +13,9 @@ services:
|
|||
- NODE_ENV=production
|
||||
networks:
|
||||
- default
|
||||
- web
|
||||
#- web
|
||||
ports:
|
||||
- 8080:80
|
||||
command: ['nginx', '-g', 'daemon off;']
|
||||
# labels:
|
||||
# - 'traefik.docker.network=web'
|
||||
|
@ -36,19 +38,17 @@ services:
|
|||
restart: on-failure
|
||||
image: node:8
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./server/Dockerfile
|
||||
env_file:
|
||||
- .env
|
||||
context: ./server
|
||||
dockerfile: ./Dockerfile
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
ports:
|
||||
- '3000:3000'
|
||||
networks:
|
||||
- default
|
||||
- postgres
|
||||
command: ['node', '/api/server/index.js']
|
||||
#- web
|
||||
command: ['node', 'index.js']
|
||||
|
||||
networks:
|
||||
web:
|
||||
external: true
|
||||
#networks:
|
||||
# web:
|
||||
# external: true
|
||||
|
|
|
@ -4,7 +4,7 @@ WORKDIR /api
|
|||
|
||||
COPY ./package-lock.json .
|
||||
COPY ./package.json .
|
||||
COPY ./server ./server
|
||||
COPY . .
|
||||
|
||||
# Build
|
||||
RUN npm install --prefix /api
|
||||
|
|
Loading…
Reference in New Issue