-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/AntonVagabond/online_store i…
…nto dev
- Loading branch information
Showing
17 changed files
with
172 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Dockerfile | ||
.idea | ||
.env.example | ||
.gitignore | ||
.github | ||
*.md | ||
.tox | ||
LICENSE | ||
Makefile | ||
table.png |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM python:3.11-alpine | ||
|
||
WORKDIR /usr/src/app | ||
|
||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
RUN pip install --upgrade pip | ||
COPY ./requirements.txt . | ||
|
||
RUN \ | ||
apk add --no-cache make && \ | ||
apk add --no-cache postgresql-libs && \ | ||
apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev && \ | ||
python3 -m pip install -r requirements.txt --no-cache-dir && \ | ||
apk --purge del .build-deps | ||
|
||
COPY . . | ||
|
||
|
||
|
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
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
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
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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
version: '3.11' | ||
|
||
services: | ||
|
||
web: | ||
build: ./ | ||
command: python manage.py runserver 0.0.0.0:8000 | ||
container_name: web-online-store | ||
volumes: | ||
- ./:/usr/src/app/ | ||
- /var/www/back/static/:/usr/src/app/static/ | ||
- /var/www/back/media/:/usr/src/app/media/ | ||
ports: | ||
- "8000:8000" | ||
env_file: | ||
- ./.env | ||
depends_on: | ||
- db | ||
- redis | ||
- rabbitmq | ||
- celery | ||
- celery-beat | ||
|
||
db: | ||
image: postgres:14-alpine | ||
container_name: db-store | ||
volumes: | ||
- postgres_data:/var/lib/postgresql/data/ | ||
environment: | ||
- POSTGRES_USER=${PG_USER} | ||
- POSTGRES_PASSWORD=${PG_PASSWORD} | ||
- POSTGRES_DB=${PG_DATABASE} | ||
|
||
redis: | ||
image: redis:latest | ||
container_name: redis-store | ||
|
||
rabbitmq: | ||
image: rabbitmq:latest | ||
container_name: rabbitmq-store | ||
|
||
celery: | ||
restart: always | ||
build: | ||
context: ./ | ||
command: celery -A online_store worker -l INFO | ||
volumes: | ||
- ./:/usr/src/app/ | ||
container_name: celery-store | ||
depends_on: | ||
- db | ||
- redis | ||
- rabbitmq | ||
- web | ||
|
||
celery-beat: | ||
restart: always | ||
build: | ||
context: ./ | ||
command: celery -A backend beat -l info | ||
volumes: | ||
- ./:/usr/src/app/ | ||
container_name: celery-beat-store | ||
depends_on: | ||
- db | ||
- redis | ||
- rabbitmq | ||
- web | ||
|
||
volumes: | ||
postgres_data: |
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
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
Oops, something went wrong.