parent
2aa2df1ba7
commit
46f5aff238
2
Makefile
2
Makefile
|
@ -79,4 +79,4 @@ redeploy:
|
|||
migrate \
|
||||
build-frontend \
|
||||
test-ci \
|
||||
redeploy
|
||||
redeploy-production
|
||||
|
|
|
@ -22,8 +22,11 @@ WORKDIR /app
|
|||
|
||||
# install requirements into a separate layer
|
||||
COPY ./requirements.txt /app/requirements.txt
|
||||
COPY ./dev_requirements.txt /app/dev_requirements.txt
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
COPY ./dev_requirements.txt /app/dev_requirements.txt
|
||||
RUN pip install -r dev_requirements.txt
|
||||
|
||||
RUN python -c "import nltk; nltk.download('punkt')"
|
||||
|
||||
# copy the code
|
|
@ -0,0 +1,12 @@
|
|||
FROM node:14-slim
|
||||
|
||||
WORKDIR /app/frontend
|
||||
|
||||
COPY ./frontend/package.json ./
|
||||
COPY ./frontend/package-lock.json ./
|
||||
|
||||
RUN npm ci
|
||||
|
||||
COPY ./frontend ./
|
||||
RUN npm run build
|
||||
|
|
@ -3,7 +3,7 @@ version: "3.7"
|
|||
services:
|
||||
club_app: &app
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
dockerfile: production.dockerfile
|
||||
context: .
|
||||
command: make docker-run-production
|
||||
container_name: club_app
|
||||
|
|
|
@ -3,9 +3,9 @@ version: "3.7"
|
|||
services:
|
||||
tests:
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
dockerfile: dev.dockerfile
|
||||
context: .
|
||||
command: pip install -r dev_requirements.txt && make test-ci
|
||||
command: make test-ci
|
||||
container_name: tests
|
||||
environment:
|
||||
- DEBUG=true # regardless of this value django will override it on false
|
||||
|
@ -43,7 +43,7 @@ services:
|
|||
|
||||
webpack:
|
||||
build:
|
||||
dockerfile: frontend/Dockerfile
|
||||
dockerfile: dev.frontend.dockerfile
|
||||
context: .
|
||||
command: npm run watch
|
||||
restart: "no"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
version: "3.7"
|
||||
|
||||
services:
|
||||
club_app:
|
||||
club_app: &app
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
dockerfile: dev.dockerfile
|
||||
context: .
|
||||
command: pip install -r dev_requirements.txt && make docker-run-dev
|
||||
command: make docker-run-dev
|
||||
container_name: club_app
|
||||
environment:
|
||||
- DEBUG=true
|
||||
|
@ -29,9 +29,9 @@ services:
|
|||
|
||||
queue:
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
dockerfile: dev.dockerfile
|
||||
context: .
|
||||
command: pip install -r dev_requirements.txt && make docker-run-queue
|
||||
command: make docker-run-queue
|
||||
environment:
|
||||
- DEBUG=true
|
||||
- PYTHONUNBUFFERED=1
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
FROM node:14-slim
|
||||
|
||||
WORKDIR /app/frontend
|
||||
|
||||
COPY ./package.json ./
|
||||
COPY ./package-lock.json ./
|
||||
|
||||
RUN npm ci
|
||||
|
||||
COPY ./ ./
|
||||
RUN npm run build
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
FROM python:3.8-slim-buster
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# required to build gdal (geo library)
|
||||
ENV CPLUS_INCLUDE_PATH /usr/include/gdal
|
||||
ENV C_INCLUDE_PATH /usr/include/gdal
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get dist-upgrade -y \
|
||||
&& apt-get install --no-install-recommends -yq \
|
||||
gcc \
|
||||
g++ \
|
||||
libc-dev \
|
||||
libpq-dev \
|
||||
gdal-bin \
|
||||
libgdal-dev \
|
||||
make \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# install requirements into a separate layer
|
||||
COPY ./requirements.txt /app/requirements.txt
|
||||
RUN pip install -r requirements.txt
|
||||
RUN python -c "import nltk; nltk.download('punkt')"
|
||||
|
||||
# copy the code
|
||||
COPY . /app
|
||||
COPY ./vas3k_club.env /app/club/.env
|
Loading…
Reference in New Issue