mirror of
https://github.com/Eugeny/tabby-web.git
synced 2026-08-17 06:46:05 +01:00
docker cleanup
This commit is contained in:
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
backend/__pycache__
|
||||||
|
backend/public
|
||||||
|
frontend/build
|
||||||
|
frontend/build-server
|
||||||
|
frontend/node_modules
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
__pycache__
|
|
||||||
public
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# syntax=docker/dockerfile:1
|
|
||||||
FROM python:3.7-alpine AS build
|
|
||||||
ARG EXTRA_DEPS
|
|
||||||
RUN apk add build-base musl-dev libffi-dev openssl-dev mariadb-dev
|
|
||||||
WORKDIR /app
|
|
||||||
RUN pip install -U setuptools 'cryptography>=3.0,<3.1' poetry==1.1.7 $EXTRA_DEPS
|
|
||||||
COPY pyproject.toml poetry.lock ./
|
|
||||||
RUN poetry config virtualenvs.create false
|
|
||||||
RUN poetry install --no-dev --no-ansi --no-interaction
|
|
||||||
|
|
||||||
FROM python:3.7-alpine AS package
|
|
||||||
WORKDIR /app
|
|
||||||
COPY --from=0 /usr /usr
|
|
||||||
COPY manage.py gunicorn.conf.py ./
|
|
||||||
COPY tabby tabby
|
|
||||||
|
|
||||||
COPY start.sh /start.sh
|
|
||||||
RUN ["chmod", "+x", "/start.sh"]
|
|
||||||
|
|
||||||
RUN ./manage.py collectstatic --noinput
|
|
||||||
|
|
||||||
CMD ["/start.sh"]
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
steps:
|
|
||||||
- name: 'gcr.io/cloud-builders/docker'
|
|
||||||
dir: 'backend'
|
|
||||||
args:
|
|
||||||
- build
|
|
||||||
- '-t'
|
|
||||||
- '${_DOCKER_TAG}'
|
|
||||||
- '--cache-from'
|
|
||||||
- '${_DOCKER_TAG}'
|
|
||||||
- '--build-arg'
|
|
||||||
- 'EXTRA_DEPS=${_EXTRA_DEPS}'
|
|
||||||
- '.'
|
|
||||||
|
|
||||||
images: ['${_DOCKER_TAG}']
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
steps:
|
|
||||||
- name: 'gcr.io/cloud-builders/docker'
|
|
||||||
dir: '.'
|
|
||||||
args:
|
|
||||||
- build
|
|
||||||
- '-t'
|
|
||||||
- '${_DOCKER_TAG}'
|
|
||||||
- '--cache-from'
|
|
||||||
- '${_DOCKER_TAG}'
|
|
||||||
- '--build-arg'
|
|
||||||
- 'EXTRA_DEPS=${_EXTRA_DEPS}'
|
|
||||||
- '.'
|
|
||||||
timeout: 1200s
|
|
||||||
|
|
||||||
images: ['${_DOCKER_TAG}']
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
build
|
|
||||||
build-server
|
|
||||||
node_modules
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# syntax=docker/dockerfile:1
|
|
||||||
FROM node:12-alpine AS build
|
|
||||||
ARG BACKEND_URL
|
|
||||||
WORKDIR /app
|
|
||||||
COPY package.json yarn.lock ./
|
|
||||||
RUN yarn
|
|
||||||
COPY webpack* tsconfig.json ./
|
|
||||||
COPY assets assets
|
|
||||||
COPY src src
|
|
||||||
COPY theme theme
|
|
||||||
RUN yarn run build
|
|
||||||
RUN yarn run build:server
|
|
||||||
|
|
||||||
FROM node:12-alpine AS package
|
|
||||||
WORKDIR /app
|
|
||||||
COPY --from=0 /app/build build
|
|
||||||
COPY --from=0 /app/build-server build-server
|
|
||||||
COPY package.json .
|
|
||||||
|
|
||||||
CMD ["npm", "start"]
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
steps:
|
|
||||||
- name: 'gcr.io/cloud-builders/docker'
|
|
||||||
dir: 'frontend'
|
|
||||||
args:
|
|
||||||
- build
|
|
||||||
- '-t'
|
|
||||||
- '${_DOCKER_TAG}'
|
|
||||||
- '--cache-from'
|
|
||||||
- '${_DOCKER_TAG}'
|
|
||||||
- '.'
|
|
||||||
|
|
||||||
images: ['${_DOCKER_TAG}']
|
|
||||||
Reference in New Issue
Block a user