update: compose add nginx as proxy

pull/536/head
Paul 6 years ago
parent 9db1c9cc6f
commit 74c74df761

@ -3,21 +3,21 @@ FROM node:lts-alpine AS builder
LABEL maintainer="llitfkitfk@gmail.com"
RUN npm install -g typescript
RUN yarn global add typescript
WORKDIR /app
# cache dependencies
COPY package.json ./
RUN npm install
RUN yarn install
# build
COPY . ./
RUN npm run build
RUN yarn run build
# RUNNING
FROM node:lts-alpine
LABEL maintainer="llitfkitfk@gmail.com"
WORKDIR /app
COPY --from=builder /app/dist/* ./
COPY --from=builder /app/dist .
COPY --from=builder /app/node_modules ./node_modules

@ -5,13 +5,17 @@ version: "3"
services:
# frontend
dolores:
nginx:
# image: nginx:stable-alpine
build:
# will use image from the frontend repo in the future
context: docker/frontend
command: serve -s /app -p 80
volumes:
- ./docker/nginx/conf.d:/etc/nginx/conf.d
ports:
- 38081:80
- 38080:38080
- 38081:38081
# backend
delos:
# build from ./Dockerfile
@ -43,8 +47,6 @@ services:
depends_on:
- redis
- mysql
ports:
- "38080:8080" # expose 38080
redis:
image: redis:4

Loading…
Cancel
Save