-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working docker setup (without autoreload)
- Loading branch information
1 parent
8b15637
commit 5a11890
Showing
5 changed files
with
90 additions
and
2 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
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 |
---|---|---|
|
@@ -16,3 +16,5 @@ docs/source/reference/ | |
|
||
# from prettier | ||
node_modules/ | ||
|
||
celerybeat-schedule |
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,16 @@ | ||
FROM python:3.11-slim-bookworm | ||
|
||
# reduce the number of celery warnings | ||
RUN useradd celery | ||
|
||
ENV PIPENV_VENV_IN_PROJECT=1 | ||
|
||
COPY Pipfile . | ||
COPY Pipfile.lock . | ||
|
||
RUN pip install pipenv && \ | ||
pipenv install | ||
|
||
ENV PATH="/.venv/bin:$PATH" | ||
|
||
WORKDIR /app |
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,61 @@ | ||
services: | ||
redis: | ||
image: redis:latest | ||
networks: | ||
- tin-network | ||
expose: | ||
- "6379" | ||
|
||
celery: | ||
image: tin-base | ||
user: celery | ||
entrypoint: | ||
- celery | ||
- -A | ||
- tin | ||
- worker | ||
networks: | ||
- tin-network | ||
depends_on: | ||
- django | ||
volumes: | ||
- .:/app | ||
|
||
celerybeat: | ||
container_name: tin_celerybeat | ||
image: tin-base | ||
entrypoint: | ||
- celery | ||
- -A | ||
- tin | ||
- beat | ||
networks: | ||
- tin-network | ||
volumes: | ||
- .:/app | ||
depends_on: | ||
- django | ||
|
||
django: | ||
container_name: tin_django | ||
build: . | ||
image: tin-base | ||
restart: on-failure | ||
networks: | ||
- tin-network | ||
ports: | ||
- 8000:8000 | ||
volumes: | ||
- .:/app | ||
entrypoint: | ||
- ./manage.py | ||
- runserver | ||
depends_on: | ||
- redis | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://0.0.0.0:8000"] | ||
|
||
networks: | ||
tin-network: | ||
driver: bridge | ||
name: tin-dev-network |
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