File tree 3 files changed +15
-3
lines changed
3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ pip install -r requirements.txt
97
97
### Docker / docker-compose
98
98
in order to use docker, please run the next commands after cloning repo:
99
99
```
100
- docker build -t djcrm:1 -f docker/Dockerfile .
100
+ docker build -t djcrm:1 -f docker/dockerfile .
101
101
docker-compose -f docker/docker-compose.yml up
102
102
```
103
103
Original file line number Diff line number Diff line change @@ -9,7 +9,13 @@ services:
9
9
- DBPASSWORD=crm
10
10
- DBHOST=crm-db
11
11
- DBPORT=5432
12
-
12
+ - ENV_TYPE=development
13
+
14
+
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"
13
19
depends_on :
14
20
- crm-db
15
21
ports :
@@ -18,7 +24,7 @@ services:
18
24
- nw
19
25
20
26
crm-db :
21
- image : postgres:latest
27
+ image : postgres:12-bookworm
22
28
container_name : crm-db
23
29
environment :
24
30
- POSTGRES_DB=crm
Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ RUN apt install -y python3-pip
21
21
RUN python3 -m pip install --no-cache-dir -r requirements.txt
22
22
RUN python3 -m pip install --no-cache-dir redis
23
23
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
+
24
30
COPY . /app
25
31
COPY docker/entrypoint.sh /app
26
32
COPY docker/wait-for-postgres.sh /app
You can’t perform that action at this time.
0 commit comments