Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copy to .env and uncomment what you need.
# Docker Compose reads .env automatically.

# Set a unique name when running multiple instances.
# COMPOSE_PROJECT_NAME=isic

# Host port mappings
# POSTGRES_PORT=5432
# ELASTICSEARCH_PORT=9200
# RABBITMQ_PORT=5672
# RABBITMQ_MGMT_PORT=15672
# MINIO_API_PORT=9000
# MINIO_CONSOLE_PORT=9001
# REDIS_PORT=6379
# DJANGO_PORT=8000
# ZIPSTREAMER_PORT=4008
2 changes: 0 additions & 2 deletions dev/.env.docker-compose
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ DJANGO_DATABASE_URL=postgres://postgres:postgres@postgres:5432/django
DJANGO_ISIC_ELASTICSEARCH_URL=http://elastic:elastic@elasticsearch:9200
DJANGO_CELERY_BROKER_URL=amqp://rabbitmq:5672/
DJANGO_MINIO_STORAGE_URL=http://minioAccessKey:minioSecretKey@minio:9000/django-storage
DJANGO_MINIO_STORAGE_MEDIA_URL=http://localhost:9000/django-storage
DJANGO_ISIC_SPONSORED_BUCKET_NAME=django-sponsored
DJANGO_ISIC_SPONSORED_MEDIA_URL=http://localhost:9000/django-sponsored
DJANGO_CACHE_URL=redis://redis:6379/0
DJANGO_ISIC_ZIP_DOWNLOAD_SERVICE_URL=http://zipstreamer:4008
# When in Docker, the bridge network sends requests from the host machine exclusively via a
Expand Down
10 changes: 8 additions & 2 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ services:
UV_PYTHON_INSTALL_DIR: /home/vscode/uv/bin
UV_LINK_MODE: symlink
TOX_WORK_DIR: /home/vscode/tox
DJANGO_MINIO_STORAGE_MEDIA_URL: "http://localhost:${MINIO_API_PORT:-9000}/django-storage"
DJANGO_ISIC_SPONSORED_MEDIA_URL: "http://localhost:${MINIO_API_PORT:-9000}/django-sponsored"
working_dir: /home/vscode/isic
env_file: ./dev/.env.docker-compose
volumes:
- .:/home/vscode/isic
- uv_cache:/home/vscode/uv
ports:
- 8000:8000
- "${DJANGO_PORT:-8000}:8000"
depends_on:
postgres:
condition: service_healthy
Expand Down Expand Up @@ -60,6 +62,8 @@ services:
UV_PYTHON_INSTALL_DIR: /home/vscode/uv/bin
UV_LINK_MODE: symlink
TOX_WORK_DIR: /home/vscode/tox
DJANGO_MINIO_STORAGE_MEDIA_URL: "http://localhost:${MINIO_API_PORT:-9000}/django-storage"
DJANGO_ISIC_SPONSORED_MEDIA_URL: "http://localhost:${MINIO_API_PORT:-9000}/django-sponsored"
working_dir: /home/vscode/isic
volumes:
- .:/home/vscode/isic
Expand Down Expand Up @@ -97,6 +101,8 @@ services:
UV_PYTHON_INSTALL_DIR: /home/vscode/uv/bin
UV_LINK_MODE: symlink
TOX_WORK_DIR: /home/vscode/tox
DJANGO_MINIO_STORAGE_MEDIA_URL: "http://localhost:${MINIO_API_PORT:-9000}/django-storage"
DJANGO_ISIC_SPONSORED_MEDIA_URL: "http://localhost:${MINIO_API_PORT:-9000}/django-sponsored"
working_dir: /home/vscode/isic
volumes:
- .:/home/vscode/isic
Expand All @@ -120,7 +126,7 @@ services:
environment:
ZS_LISTFILE_URL_PREFIX: "http://django/api/v2/zip-download/file-listing/?token="
ports:
- 4008:4008
- "${ZIPSTREAMER_PORT:-4008}:4008"

volumes:
uv_cache:
14 changes: 7 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
test: ["CMD", "pg_isready", "--username", "postgres"]
start_period: 30s
ports:
- 5432:5432
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- postgres:/var/lib/postgresql

Expand All @@ -25,7 +25,7 @@ services:
test: ["CMD", "curl", "--fail", "--user", "elastic:elastic", "http://localhost:9200/"]
start_period: 30s
ports:
- 9200:9200
- "${ELASTICSEARCH_PORT:-9200}:9200"
volumes:
- elasticsearch:/usr/share/elasticsearch/data

Expand All @@ -35,8 +35,8 @@ services:
test: ["CMD", "rabbitmq-diagnostics", "ping"]
start_period: 30s
ports:
- 5672:5672
- 15672:15672
- "${RABBITMQ_PORT:-5672}:5672"
- "${RABBITMQ_MGMT_PORT:-15672}:15672"
volumes:
- rabbitmq:/var/lib/rabbitmq

Expand All @@ -54,8 +54,8 @@ services:
timeout: 1s
start_period: 30s
ports:
- 9000:9000
- 9001:9001
- "${MINIO_API_PORT:-9000}:9000"
- "${MINIO_CONSOLE_PORT:-9001}:9001"
volumes:
- minio:/data

Expand All @@ -65,7 +65,7 @@ services:
test: ["CMD", "redis-cli", "ping"]
start_period: 30s
ports:
- 6379:6379
- "${REDIS_PORT:-6379}:6379"
volumes:
- redis:/data

Expand Down