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" LABEL maintainer="llitfkitfk@gmail.com"
RUN npm install -g typescript RUN yarn global add typescript
WORKDIR /app WORKDIR /app
# cache dependencies # cache dependencies
COPY package.json ./ COPY package.json ./
RUN npm install RUN yarn install
# build # build
COPY . ./ COPY . ./
RUN npm run build RUN yarn run build
# RUNNING # RUNNING
FROM node:lts-alpine FROM node:lts-alpine
LABEL maintainer="llitfkitfk@gmail.com" LABEL maintainer="llitfkitfk@gmail.com"
WORKDIR /app WORKDIR /app
COPY --from=builder /app/dist/* ./ COPY --from=builder /app/dist .
COPY --from=builder /app/node_modules ./node_modules COPY --from=builder /app/node_modules ./node_modules

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

Loading…
Cancel
Save