File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,7 @@ RUN python -m venv $POETRY_HOME
4141
4242RUN $POETRY_HOME/bin/pip install poetry==2.1.3
4343
44- COPY pyproject.toml .
45- COPY poetry.lock .
44+ COPY pyproject.toml poetry.lock .
4645
4746RUN $POETRY_HOME/bin/poetry install --compile --no-root
4847
@@ -59,6 +58,11 @@ ENV GIT_COMMIT=${GIT_COMMIT}
5958
6059CMD ["python" , "manage.py" , "--help" ]
6160
61+ # ## Dev
62+ FROM app AS dev
63+
64+ RUN $POETRY_HOME/bin/poetry install --compile --only dev
65+
6266# ## Dist
6367FROM app AS dist
6468
@@ -70,9 +74,5 @@ RUN apt-get remove -y \
7074 zlib1g-dev \
7175 && apt-get clean \
7276 && apt-get autoremove -y \
73- && rm -rf /var/lib/apt/lists/*
74-
75- # ## Dev
76- FROM app AS dev
77-
78- RUN $POETRY_HOME/bin/poetry install --compile --only dev
77+ && rm -rf /var/lib/apt/lists/* \
78+ && rm -rf /tmp/poetry-*
Original file line number Diff line number Diff line change @@ -146,6 +146,7 @@ services:
146146 build :
147147 context : .
148148 dockerfile : Dockerfile
149+ target : dev
149150 command :
150151 - /bin/bash
151152 - -c
@@ -163,6 +164,7 @@ services:
163164 build :
164165 context : .
165166 dockerfile : Dockerfile
167+ target : dev
166168 command :
167169 /bin/bash -c 'cp -r /elastic8_certs /elastic_certs && chown -R daemon:daemon /elastic_certs/ && /usr/local/bin/celery --app project worker --uid daemon -l INFO'
168170 depends_on :
@@ -188,6 +190,7 @@ services:
188190 build :
189191 context : .
190192 dockerfile : Dockerfile
193+ target : dev
191194 command : python manage.py runserver 0.0.0.0:8000
192195 ports :
193196 - 8003:8000
@@ -212,6 +215,7 @@ services:
212215 build :
213216 context : .
214217 dockerfile : Dockerfile
218+ target : dev
215219 command : python manage.py shtrove_indexer_run
216220 depends_on :
217221 - postgres
You can’t perform that action at this time.
0 commit comments