Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single container test #66

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# 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"

# Set environment varibles
ENV PYTHONUNBUFFERED 1

# Install libenchant and create the requirements folder.
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

# Install the bakerydemo project's dependencies into the image.
Expand All @@ -26,3 +26,7 @@ RUN cd /code/wagtail/ \
COPY ./libs/Willow /code/willow/
RUN cd /code/willow/ \
&& 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
7 changes: 0 additions & 7 deletions Dockerfile.frontend

This file was deleted.

15 changes: 1 addition & 14 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
container_name: "web"
build: ./
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"
volumes:
- ./wagtail:/code/wagtail:delegated,rw
Expand All @@ -22,7 +22,6 @@ services:
PYTHONPATH: "/code/wagtail:/code/bakerydemo:$PYTHONPATH"
depends_on:
- db
- frontend
db:
container_name: "db"
image: postgres:12.3-alpine
Expand All @@ -35,15 +34,3 @@ services:
restart: "no"
expose:
- "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
Loading