Browse Source

Move Dockerfile.prod to docker directory, fix #1676

pull/1686/head
Hironsan 2 years ago
parent
commit
9420c624e1
3 changed files with 8 additions and 7 deletions
  1. 4
      docker-compose.prod.yml
  2. 0
      docker/Dockerfile.prod
  3. 11
      nginx/Dockerfile

4
docker-compose.prod.yml

@ -4,7 +4,7 @@ services:
backend: backend:
build: build:
context: . context: .
dockerfile: backend/Dockerfile.prod
dockerfile: docker/Dockerfile.prod
image: doccano_backend:prod image: doccano_backend:prod
volumes: volumes:
- static_volume:/backend/staticfiles - static_volume:/backend/staticfiles
@ -27,7 +27,7 @@ services:
celery: celery:
build: build:
context: . context: .
dockerfile: backend/Dockerfile.prod
dockerfile: docker/Dockerfile.prod
image: doccano_celery:prod image: doccano_celery:prod
volumes: volumes:
- media:/backend/media - media:/backend/media

backend/Dockerfile.prod → docker/Dockerfile.prod

11
nginx/Dockerfile

@ -1,13 +1,14 @@
ARG NODE_VERSION="16.5-alpine3.14"
ARG NODE_VERSION="16.14-buster-slim"
FROM node:${NODE_VERSION} AS frontend-builder FROM node:${NODE_VERSION} AS frontend-builder
COPY frontend/ /app/ COPY frontend/ /app/
WORKDIR /app WORKDIR /app
RUN apk add -U --no-cache git python3 make g++ \
&& yarn install \
&& yarn build \
&& apk del --no-cache git make g++
RUN apt-get update \
&& apt-get install -y git python3 make g++ \
&& yarn install \
&& yarn build \
&& apt-get clean
FROM nginx:1.21.1-alpine AS runtime FROM nginx:1.21.1-alpine AS runtime

Loading…
Cancel
Save