Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |