You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
depot_django/docker-compose.dev.yml

67 lines
1.8 KiB
YAML

version: '3.8'
services:
database:
image: postgres
environment:
- POSTGRES_DB=depot # Matches DB_NAME in production.env
- POSTGRES_USER=postgres # Matches DB_USER in production.env
- POSTGRES_PASSWORD=admin # Matches DB_PASSWORD in production.env
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d depot"] # Check specific database
interval: 5s
timeout: 5s
retries: 5
networks:
- app-network
minio:
image: minio/minio:latest
ports:
- "9000:9000" # API Port
- "9001:9001" # Console Port
environment:
MINIO_ROOT_USER: kikimor # Change this
MINIO_ROOT_PASSWORD: shushunka1
MINIO_SERVER_URL: http://localhost:9000
MINIO_ADDRESS: "0.0.0.0:9000"
MINIO_BROWSER_REDIRECT_URL: "http://localhost:9001" # Console URL
volumes:
- minio_data:/data
command: server --console-address ":9001" /data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 30s
timeout: 20s
retries: 3
networks:
- app-network
# Optional: Create buckets and users on startup
createbuckets:
image: minio/mc
depends_on:
- minio
entrypoint: ["/bin/sh", "-c"]
command: |
sleep 10 &&
mc alias set myminio http://minio:9000 kikimor shushunka1 &&
mc mb myminio/damages --ignore-existing &&
mc policy set download myminio/damages &&
mc mb myminio/static --ignore-existing &&
mc policy set download myminio/static &&
echo "Buckets created and policies set successfully"
networks:
- app-network
volumes:
postgres_data:
minio_data:
networks:
app-network:
driver: bridge