fix: ready to use docker compose
This commit is contained in:
+38
-27
@@ -3,9 +3,9 @@ services:
|
||||
postgres:
|
||||
image: postgres:14.1
|
||||
environment:
|
||||
POSTGRES_USER: admin
|
||||
POSTGRES_PASSWORD: development
|
||||
POSTGRES_DB: default
|
||||
- POSTGRES_USER=${POSTGRES_USER:-admin}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-development}
|
||||
- POSTGRES_DB=${POSTGRES_DB:-default}
|
||||
volumes:
|
||||
- "./data/postgres:/var/lib/postgres/data"
|
||||
|
||||
@@ -20,22 +20,22 @@ services:
|
||||
redis:
|
||||
image: redis
|
||||
|
||||
shoppy:
|
||||
image: shoppy
|
||||
shoppy_server:
|
||||
image: ghcr.io/pablo-moreno/shoppy
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
DEBUG: "True"
|
||||
DATABASE_URL: "postgres://admin:development@postgres:5432/default"
|
||||
S3_HOST: "http://172.17.0.1:9190"
|
||||
S3_LOCATION: "backend"
|
||||
S3_STORAGE_BUCKET_NAME: "shoppy"
|
||||
S3_ENDPOINT_URL: "http://172.17.0.1:9190"
|
||||
S3_ENABLED: "True"
|
||||
S3_ACCESS_KEY_ID: "shoppy-access-key"
|
||||
S3_SECRET_ACCESS_KEY: "shoppy-secret-key"
|
||||
RUN_SERVER: "TRUE"
|
||||
CELERY_BROKER_URL: "redis://redis:6379/0"
|
||||
- DEBUG=${DEBUG:-False}
|
||||
- DATABASE_URL=${DATABASE_URL:-postgres://admin:development@postgres:5432/default}
|
||||
- S3_HOST=${S3_HOST:-http://172.17.0.1:9190}
|
||||
- S3_LOCATION=${S3_LOCATION:-backend}
|
||||
- S3_STORAGE_BUCKET_NAME=${S3_STORAGE_BUCKET_NAME:-shoppy}
|
||||
- S3_ENDPOINT_URL=${S3_ENDPOINT_URL:-http://172.17.0.1:9190}
|
||||
- S3_ENABLED=${S3_ENABLED:-True}
|
||||
- S3_ACCESS_KEY_ID=${S3_ACCESS_KEY_ID:-shoppy-access-key}
|
||||
- S3_SECRET_ACCESS_KEY=${S3_SECRET_ACCESS_KEY:-shoppy-secret-key}
|
||||
- CELERY_BROKER_URL=${CELERY_BROKER_URL:-redis://redis:6379/0}
|
||||
- RUN_SERVER=TRUE
|
||||
links:
|
||||
- postgres
|
||||
- minio
|
||||
@@ -46,18 +46,19 @@ services:
|
||||
- redis
|
||||
|
||||
shoppy_tasks:
|
||||
image: shoppy
|
||||
image: ghcr.io/pablo-moreno/shoppy
|
||||
environment:
|
||||
DATABASE_URL: "postgres://admin:development@postgres:5432/default"
|
||||
S3_HOST: "http://172.17.0.1:9190"
|
||||
S3_LOCATION: "backend"
|
||||
S3_STORAGE_BUCKET_NAME: "shoppy"
|
||||
S3_ENDPOINT_URL: "http://172.17.0.1:9190"
|
||||
S3_ENABLED: "True"
|
||||
S3_ACCESS_KEY_ID: "shoppy-access-key"
|
||||
S3_SECRET_ACCESS_KEY: "shoppy-secret-key"
|
||||
RUN_CELERY: "TRUE"
|
||||
CELERY_BROKER_URL: "redis://redis:6379/0"
|
||||
- DEBUG=${DEBUG:-False}
|
||||
- DATABASE_URL=${DATABASE_URL:-postgres://admin:development@postgres:5432/default}
|
||||
- S3_HOST=${S3_HOST:-http://172.17.0.1:9190}
|
||||
- S3_LOCATION=${S3_LOCATION:-backend}
|
||||
- S3_STORAGE_BUCKET_NAME=${S3_STORAGE_BUCKET_NAME:-shoppy}
|
||||
- S3_ENDPOINT_URL=${S3_ENDPOINT_URL:-http://172.17.0.1:9190}
|
||||
- S3_ENABLED=${S3_ENABLED:-True}
|
||||
- S3_ACCESS_KEY_ID=${S3_ACCESS_KEY_ID:-shoppy-access-key}
|
||||
- S3_SECRET_ACCESS_KEY=${S3_SECRET_ACCESS_KEY:-shoppy-secret-key}
|
||||
- CELERY_BROKER_URL=${CELERY_BROKER_URL:-redis://redis:6379/0}
|
||||
- RUN_CELERY=TRUE
|
||||
links:
|
||||
- postgres
|
||||
- minio
|
||||
@@ -66,3 +67,13 @@ services:
|
||||
- postgres
|
||||
- minio
|
||||
- redis
|
||||
|
||||
shoppy_migrations:
|
||||
image: ghcr.io/pablo-moreno/shoppy
|
||||
environment:
|
||||
- DATABASE_URL=${DATABASE_URL:-postgres://admin:development@postgres:5432/default}
|
||||
command: ["python", "manage.py", "migrate"]
|
||||
links:
|
||||
- postgres
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
Reference in New Issue
Block a user