🔮 Added docker-compose so that it could be deployed in one command.

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
RenChu 3 years ago
parent 06c11e2cb2
commit e78c22be7f

@ -17,6 +17,7 @@ RUN apk update && apk add --no-cache ca-certificates && update-ca-certificates
COPY --from=build-env /paopao-ce/paopao-ce /usr/bin/paopao-ce
COPY --from=build-env /paopao-ce/assets/comic.ttf /assets/comic.ttf
COPY --from=build-env /paopao-ce/configs /configs
COPY config.yaml .
EXPOSE 8000

@ -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 ./dist/ /usr/share/nginx/html/
COPY --from=node /work/dist/ /usr/share/nginx/html/
# HEALTHCHECK
HEALTHCHECK --interval=5s --timeout=3s --retries=3 CMD service nginx status | grep running || exit 1
Loading…
Cancel
Save