kopia lustrzana https://github.com/wagtail/docker-wagtail-develop
Merge 03f3d2e58f
into 849497e87a
commit
bb95430ff0
|
@ -1,5 +1,5 @@
|
||||||
# Use an official Python runtime as a parent image
|
# Use an official Python runtime as a parent image
|
||||||
FROM python:3.8-bullseye
|
FROM nikolaik/python-nodejs:python3.11-nodejs20-slim
|
||||||
LABEL maintainer="hello@wagtail.org"
|
LABEL maintainer="hello@wagtail.org"
|
||||||
|
|
||||||
# Set environment varibles
|
# Set environment varibles
|
||||||
|
@ -7,7 +7,7 @@ ENV PYTHONUNBUFFERED 1
|
||||||
|
|
||||||
# Install libenchant and create the requirements folder.
|
# Install libenchant and create the requirements folder.
|
||||||
RUN apt-get update -y \
|
RUN apt-get update -y \
|
||||||
&& apt-get install -y libenchant-2-dev postgresql-client \
|
&& apt-get install -y libenchant-2-dev postgresql-client libpq-dev gcc make git \
|
||||||
&& mkdir -p /code/requirements
|
&& mkdir -p /code/requirements
|
||||||
|
|
||||||
# Install the bakerydemo project's dependencies into the image.
|
# Install the bakerydemo project's dependencies into the image.
|
||||||
|
@ -26,3 +26,7 @@ RUN cd /code/wagtail/ \
|
||||||
COPY ./libs/Willow /code/willow/
|
COPY ./libs/Willow /code/willow/
|
||||||
RUN cd /code/willow/ \
|
RUN cd /code/willow/ \
|
||||||
&& pip install -e .[testing]
|
&& pip install -e .[testing]
|
||||||
|
|
||||||
|
# Copy the npm dependencies and install them.
|
||||||
|
COPY ./wagtail/package.json ./wagtail/package-lock.json ./
|
||||||
|
RUN npm --prefix / install --loglevel info
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
FROM node:18-slim
|
|
||||||
LABEL maintainer="hello@wagtail.org"
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install rsync make -y
|
|
||||||
COPY ./wagtail/package.json ./wagtail/package-lock.json ./
|
|
||||||
|
|
||||||
RUN npm --prefix / install --loglevel info
|
|
|
@ -9,7 +9,7 @@ services:
|
||||||
container_name: "web"
|
container_name: "web"
|
||||||
build: ./
|
build: ./
|
||||||
working_dir: /code/bakerydemo
|
working_dir: /code/bakerydemo
|
||||||
command: python manage.py runserver 0.0.0.0:8000
|
command: bash -c "cd /code/wagtail && npm run start & python manage.py runserver 0.0.0.0:8000"
|
||||||
restart: "no"
|
restart: "no"
|
||||||
volumes:
|
volumes:
|
||||||
- ./wagtail:/code/wagtail:delegated,rw
|
- ./wagtail:/code/wagtail:delegated,rw
|
||||||
|
@ -22,7 +22,6 @@ services:
|
||||||
PYTHONPATH: "/code/wagtail:/code/bakerydemo"
|
PYTHONPATH: "/code/wagtail:/code/bakerydemo"
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
- frontend
|
|
||||||
db:
|
db:
|
||||||
container_name: "db"
|
container_name: "db"
|
||||||
image: postgres:12.3-alpine
|
image: postgres:12.3-alpine
|
||||||
|
@ -35,15 +34,3 @@ services:
|
||||||
restart: "no"
|
restart: "no"
|
||||||
expose:
|
expose:
|
||||||
- "5432"
|
- "5432"
|
||||||
frontend:
|
|
||||||
container_name: "frontend"
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile.frontend
|
|
||||||
working_dir: /code/wagtail
|
|
||||||
volumes:
|
|
||||||
- ./wagtail:/code/wagtail:delegated,rw
|
|
||||||
- node_modules:/code/wagtail/node_modules/
|
|
||||||
command: bash -c "echo 'Copying node_modules, this may take a few minutes...' && rsync -rah --info=progress2 /node_modules /code/wagtail/ && npm run start"
|
|
||||||
restart: "no"
|
|
||||||
tty: true
|
|
||||||
|
|
Ładowanie…
Reference in New Issue