mirror of https://github.com/rocboss/paopao-ce
Todo: For now, this docker-compose config assumes mysql and zinc are running in the environment. Will consider moving them to containers.pull/63/head
parent
06c11e2cb2
commit
e78c22be7f
@ -0,0 +1,12 @@
|
|||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
expose:
|
||||||
|
- 3306
|
||||||
|
- 4080
|
||||||
|
|
||||||
|
frontend:
|
||||||
|
build:
|
||||||
|
context: web
|
@ -1,9 +1,15 @@
|
|||||||
FROM library/nginx
|
FROM node as node
|
||||||
|
|
||||||
USER root
|
WORKDIR /work/
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN yarn
|
||||||
|
RUN yarn build
|
||||||
|
|
||||||
|
FROM nginx as nginx
|
||||||
# copy static files
|
# copy static files
|
||||||
COPY ./dist/ /usr/share/nginx/html/
|
COPY --from=node /work/dist/ /usr/share/nginx/html/
|
||||||
|
|
||||||
# HEALTHCHECK
|
# HEALTHCHECK
|
||||||
HEALTHCHECK --interval=5s --timeout=3s --retries=3 CMD service nginx status | grep running || exit 1
|
HEALTHCHECK --interval=5s --timeout=3s --retries=3 CMD service nginx status | grep running || exit 1
|
||||||
|
Loading…
Reference in new issue