Skip to content

Commit 11184ce

Browse files
authored
Merge pull request #526 from wake0up0ne0/master
fix typo in dockerfile name
2 parents 757cdd6 + 7e26d1f commit 11184ce

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pip install -r requirements.txt
9797
### Docker / docker-compose
9898
in order to use docker, please run the next commands after cloning repo:
9999
```
100-
docker build -t djcrm:1 -f docker/Dockerfile .
100+
docker build -t djcrm:1 -f docker/dockerfile .
101101
docker-compose -f docker/docker-compose.yml up
102102
```
103103

docker/docker-compose.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ services:
99
- DBPASSWORD=crm
1010
- DBHOST=crm-db
1111
- DBPORT=5432
12-
12+
- ENV_TYPE=development
13+
- DEFAULT_FROM_EMAIL=your_email@example.com
14+
- ADMIN_EMAIL=your_admin_email@example.com
15+
- CELERY_BROKER_URL="celery.url"
16+
- CELERY_RESULT_BACKEND="celery.backend.url"
17+
- DOMAIN_NAME="DOMAIN.NAME"
18+
- SWAGGER_ROOT_URL="SWAGGER.ROOT.URL"
1319
depends_on:
1420
- crm-db
1521
ports:
@@ -18,7 +24,7 @@ services:
1824
- nw
1925

2026
crm-db:
21-
image: postgres:latest
27+
image: postgres:12-bookworm
2228
container_name: crm-db
2329
environment:
2430
- POSTGRES_DB=crm

docker/dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ RUN apt install -y python3-pip
2121
RUN python3 -m pip install --no-cache-dir -r requirements.txt
2222
RUN python3 -m pip install --no-cache-dir redis
2323

24+
RUN python3 -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())' > /app/secret_key.txt
25+
ENV SECRET_KEY \
26+
$(cat /app/secret_key.txt)
27+
RUN rm /app/secret_key.txt
28+
29+
2430
COPY . /app
2531
COPY docker/entrypoint.sh /app
2632
COPY docker/wait-for-postgres.sh /app

0 commit comments

Comments
 (0)