triyng to fix autostart from docker
This commit is contained in:
parent
09df7125fd
commit
7e26d1fda7
2 changed files with 14 additions and 2 deletions
|
|
@ -9,7 +9,13 @@ services:
|
|||
- DBPASSWORD=crm
|
||||
- DBHOST=crm-db
|
||||
- DBPORT=5432
|
||||
|
||||
- ENV_TYPE=development
|
||||
- DEFAULT_FROM_EMAIL=your_email@example.com
|
||||
- ADMIN_EMAIL=your_admin_email@example.com
|
||||
- CELERY_BROKER_URL="celery.url"
|
||||
- CELERY_RESULT_BACKEND="celery.backend.url"
|
||||
- DOMAIN_NAME="DOMAIN.NAME"
|
||||
- SWAGGER_ROOT_URL="SWAGGER.ROOT.URL"
|
||||
depends_on:
|
||||
- crm-db
|
||||
ports:
|
||||
|
|
@ -18,7 +24,7 @@ services:
|
|||
- nw
|
||||
|
||||
crm-db:
|
||||
image: postgres:latest
|
||||
image: postgres:12-bookworm
|
||||
container_name: crm-db
|
||||
environment:
|
||||
- POSTGRES_DB=crm
|
||||
|
|
|
|||
|
|
@ -21,6 +21,12 @@ RUN apt install -y python3-pip
|
|||
RUN python3 -m pip install --no-cache-dir -r requirements.txt
|
||||
RUN python3 -m pip install --no-cache-dir redis
|
||||
|
||||
RUN python3 -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())' > /app/secret_key.txt
|
||||
ENV SECRET_KEY \
|
||||
$(cat /app/secret_key.txt)
|
||||
RUN rm /app/secret_key.txt
|
||||
|
||||
|
||||
COPY . /app
|
||||
COPY docker/entrypoint.sh /app
|
||||
COPY docker/wait-for-postgres.sh /app
|
||||
|
|
|
|||
Loading…
Reference in a new issue