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

'Quick Start' Dockerfile&docker-compose, HacktoberFest #6920

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 29 additions & 0 deletions Dockerfile
@@ -0,0 +1,29 @@
#adding Django dependencies
FROM django

#adding Python 3.7 dependencies
FROM python:3.7

#creating working directory
ADD . /django-cms

#switching to woring directory
WORKDIR /django-cms

#RUN pip3 install --upgrade virtualenv

# RUN virtualenv env

# RUN source env/bin/activate

#installing djangocms-installer
RUN pip3 install djangocms-installer

#creating and switching to working directory
WORKDIR /django-cms/my-project

#running djangocms
RUN djangocms -f -p . my_project

#opening tpc/8000 port
EXPOSE 8000
24 changes: 24 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,24 @@
version: '3.3'

services:
#postgresdb for djangoc-cms
db:
image: postgres
environment:
- POSTGRES_DB=djangodb
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres

#django-cms
django-cms:
build: .
command: python3 manage.py runserver 0.0.0.0:8000
container_name: django_cms
# environment:
# - DATABASE_URL
# volumes:
# - .:/code
ports:
- "8000:8000"
depends_on:
- db