瀏覽代碼

Update Dockerfile

pull/544/head
Guillaume Vincent 4 年之前
父節點
當前提交
c8361afd73
共有 5 個檔案被更改,包括 25 行新增24 行删除
  1. +6
    -13
      containers/backend/Dockerfile
  2. +13
    -0
      containers/blog/Dockerfile
  3. +1
    -1
      containers/docker-compose.yml
  4. +1
    -6
      containers/webserver/Dockerfile
  5. +4
    -4
      packages/lesspass-site/Dockerfile

+ 6
- 13
containers/backend/Dockerfile 查看文件

@@ -1,20 +1,13 @@
FROM python:3.6

MAINTAINER "LessPass <contact@lesspass.com>"

LABEL maintainer="LessPass <contact@lesspass.com>"
LABEL name="LessPass Backend"

RUN mkdir /app
WORKDIR /app
COPY requirements.txt /app
RUN mkdir /opt/backend
WORKDIR /opt/backend
COPY requirements.txt /opt/backend
RUN python -m pip install --upgrade pip
RUN python -m pip install -r requirements.txt

COPY . /app
COPY . /opt/backend
RUN python --version

EXPOSE 8000

ENTRYPOINT ["/app/entrypoint.sh"]

ENTRYPOINT ["/opt/backend/entrypoint.sh"]
CMD ["gunicorn", "lesspass.wsgi:application", "--access-logfile", "-", "--error-logfile", "-", "--log-level", "debug", "--bind", "0.0.0.0:8000"]

+ 13
- 0
containers/blog/Dockerfile 查看文件

@@ -0,0 +1,13 @@
FROM node:lts AS builder
LABEL maintainer="LessPass <contact@lesspass.com>"
LABEL name="LessPass Blog"
WORKDIR /opt/blog
COPY package.json yarn.lock ./
RUN yarn install
COPY . /opt/blog
RUN yarn build
FROM nginx:alpine
COPY --from=builder /opt/blog/build /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

+ 1
- 1
containers/docker-compose.yml 查看文件

@@ -2,7 +2,7 @@ version: "3"
services:
db:
restart: always
image: postgres:10
image: postgres:9.5
volumes:
- postgresql:/var/lib/postgresql/data
environment:


+ 1
- 6
containers/webserver/Dockerfile 查看文件

@@ -1,13 +1,8 @@
FROM httpd:2.4

MAINTAINER "LessPass <contact@lesspass.com>"

LABEL maintainer="LessPass <contact@lesspass.com>"
LABEL name="LessPass Web Server"

COPY ./httpd.conf /usr/local/apache2/conf/httpd.conf
COPY ./httpd-ssl.conf /usr/local/apache2/conf/extra/httpd-ssl.conf
COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

CMD ["httpd-foreground"]

+ 4
- 4
packages/lesspass-site/Dockerfile 查看文件

@@ -1,13 +1,13 @@
FROM node:lts AS builder
MAINTAINER "LessPass <contact@lesspass.com>"
LABEL maintainer="LessPass <contact@lesspass.com>"
LABEL name="LessPass Frontend"
WORKDIR /frontend
WORKDIR /opt/frontend
COPY package.json yarn.lock ./
RUN yarn install
COPY . /frontend
COPY . /opt/frontend
RUN yarn build
FROM nginx:alpine
COPY --from=builder /frontend/build /usr/share/nginx/html
COPY --from=builder /opt/frontend/build /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

Loading…
取消
儲存