This is repository is for debugging use and not intended for production environment. For security concern, please configure with such setting DJANGO_DEBUG=False.
docker-compose.ymldocker-compose.ymlsudo docker-compose up
-dadmin/admin (user/password)
sudo docker-compose down-v option to also remove volumes which is define in docker-compose file sudo docker-compose pullsudo docker-compose upversion: '3'
services:
db:
image: postgres
volumes:
- db_data:/var/lib/postgresql/data
web:
image: hp5588/django-cms
volumes:
- site_data:/code
ports:
- "8000:8000"
depends_on:
- db
environment:
- HOST=<your domain>
- SITE_NAME=mysite
volumes:
site_data:
db_data:
Following parts are already included in docker image (here only for reference)
FROM python:3
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
COPY requirements.txt /code/
RUN \
python3 -m pip install virtualenv \
&& python3 -m virtualenv env \
&& . env/bin/activate \
&& pip install -r requirements.txt
COPY entrypoint.sh /code/
RUN chmod +x entrypoint.sh
CMD ["/bin/bash","entrypoint.sh"]
#!/bin/bash
#activate venv
source env/bin/activate
if [ ! -d "$SITE_NAME" ]; then
# create site
djangocms $SITE_NAME --db "postgres://postgres@db:5432/postgres"
fi
cd $SITE_NAME
# update setting
sed -i "s/^ALLOWED_HOSTS.*/ALLOWED_HOSTS = ["$HOST"]/m" $SITE_NAME/settings.py
python manage.py runserver 0.0.0.0:8000
Django>=2.0,<3.0
psycopg2-binary>=2.7,<3.0
djangocms-installer
Content type
Image
Digest
Size
367.1 MB
Last updated
over 7 years ago
docker pull hp5588/django-cms