kopia lustrzana https://github.com/wagtail/docker-wagtail-develop
Initial commit
commit
dbbe78a0a9
|
@ -0,0 +1,19 @@
|
|||
# Use an official Python runtime as a parent image
|
||||
FROM python:3.7
|
||||
LABEL maintainer="hello@wagtail.io"
|
||||
|
||||
# Set environment varibles
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
RUN mkdir -p /code/requirements
|
||||
COPY ./bakerydemo/requirements/base.txt /code/requirements/base.txt
|
||||
COPY ./bakerydemo/requirements/production.txt /code/requirements/production.txt
|
||||
|
||||
RUN pip install --upgrade pip
|
||||
RUN pip install -r /code/requirements/production.txt
|
||||
|
||||
# Install any needed packages specified in requirements.txt
|
||||
# RUN pip install -r /code/requirements.txt
|
||||
RUN pip install gunicorn
|
||||
|
||||
EXPOSE 8000
|
|
@ -0,0 +1,25 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
web:
|
||||
build: ./
|
||||
working_dir: /code/bakerydemo
|
||||
command: python manage.py runserver 0.0.0.0:8000
|
||||
volumes:
|
||||
- ./wagtail:/code/wagtail:rw
|
||||
- ./bakerydemo:/code/bakerydemo:rw
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
DATABASE_URL: postgres://wagtail:changeme@postgres/wagtail
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
image: postgres:9.6.2-alpine
|
||||
environment:
|
||||
POSTGRES_USER: wagtail
|
||||
POSTGRES_DB: wagtail
|
||||
POSTGRES_PASSWORD: changeme
|
||||
restart: always
|
||||
expose:
|
||||
- "5432"
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env python
|
||||
import os
|
||||
import sys
|
||||
|
||||
import dotenv
|
||||
|
||||
sys.path.append('wagtail')
|
||||
sys.path.append('bakerydemo')
|
||||
sys.path.append('libs/Willow')
|
||||
sys.path.append('libs/django-modelcluster')
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
dotenv.read_dotenv()
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bakerydemo.settings.dev")
|
||||
|
||||
from django.core.management import execute_from_command_line
|
||||
|
||||
execute_from_command_line(sys.argv)
|
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Fail if any command fails.
|
||||
set -e
|
||||
|
||||
if [ ! -d "bakerydemo" ]; then
|
||||
git clone https://github.com/wagtail/bakerydemo.git
|
||||
else
|
||||
echo Directory bakerydemo already exists, skipping...
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -d "wagtail" ]; then
|
||||
git clone https://github.com/wagtail/wagtail.git
|
||||
else
|
||||
echo Directory wagtail already exists, skipping...
|
||||
fi
|
||||
|
||||
|
||||
mkdir -p libs
|
||||
|
||||
|
||||
if [ ! -d "libs/django-modelcluster" ]; then
|
||||
git clone https://github.com/wagtail/django-modelcluster.git libs/django-modelcluster
|
||||
else
|
||||
echo Directory libs/django-modelcluster already exists, skipping...
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -d "libs/Willow" ]; then
|
||||
git clone https://github.com/wagtail/Willow.git libs/Willow
|
||||
else
|
||||
echo Directory libs/Willow already exists, skipping...
|
||||
fi
|
||||
|
||||
echo Starting a vagrant machine...
|
||||
vagrant up
|
Ładowanie…
Reference in New Issue