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