@@ -7,7 +7,7 @@ services:
77 sh -c "
88 python manage.py migrate &&
99 python manage.py collectstatic --noinput &&
10- gunicorn mysite.wsgi:application --bind 0.0.0.0: 8000
10+ daphne -b 0.0.0.0 -p 8000 --access-log - --verbosity 1 mysite.asgi:application
1111 "
1212 ports :
1313 - " 8000:8000" # ✅ only required exposed port
@@ -26,9 +26,9 @@ services:
2626 - REDIS_HOST=redis
2727
2828 # S3 (MinIO)
29- - AWS_ACCESS_KEY_ID=minioadmin
30- - AWS_SECRET_ACCESS_KEY=minioadmin
31- - AWS_S3_ENDPOINT_URL=http://minio :9000
29+ - AWS_ACCESS_KEY_ID=bizbuch_admin
30+ - AWS_SECRET_ACCESS_KEY=bizbuch_secret_key
31+ - AWS_S3_ENDPOINT_URL=http://172.28.0.13 :9000
3232 - AWS_S3_BUCKET=bizbuch
3333 - AWS_DEFAULT_REGION=us-east-1
3434 - AWS_S3_USE_SSL=False
@@ -42,6 +42,9 @@ services:
4242 condition : service_started
4343 minio_init :
4444 condition : service_completed_successfully
45+ networks :
46+ bizbuch_network :
47+ ipv4_address : 172.28.0.10
4548
4649 db :
4750 image : postgres:15
@@ -50,33 +53,60 @@ services:
5053 POSTGRES_DB : bizbuch
5154 POSTGRES_USER : postgres
5255 POSTGRES_PASSWORD : postgres
56+ # Optional: expose Postgres port only if needed for external access
57+ ports :
58+ - " 5432:5432"
5359 volumes :
5460 - postgres_data:/var/lib/postgresql/data
5561 healthcheck :
5662 test : ["CMD-SHELL", "pg_isready -U postgres -d bizbuch"]
5763 interval : 5s
5864 timeout : 3s
5965 retries : 20
66+ networks :
67+ bizbuch_network :
68+ ipv4_address : 172.28.0.11
6069
6170 redis :
6271 image : redis:7-alpine
6372 restart : always
73+ # Optional: expose Redis port only if needed for external access
74+ # ports:
75+ # - "6379:6379"
76+ networks :
77+ bizbuch_network :
78+ ipv4_address : 172.28.0.12
79+
80+ redisinsight :
81+ image : redis/redisinsight:latest
82+ container_name : redisinsight
83+ restart : always
84+ ports :
85+ - " 5540:5540"
86+ depends_on :
87+ - redis
88+ networks :
89+ bizbuch_network :
90+ ipv4_address : 172.28.0.17
6491
6592 minio :
6693 image : minio/minio:latest
6794 container_name : minio
6895 restart : always
6996 environment :
70- MINIO_ROOT_USER : minioadmin
71- MINIO_ROOT_PASSWORD : minioadmin
97+ MINIO_ROOT_USER : bizbuch_admin
98+ MINIO_ROOT_PASSWORD : bizbuch_secret_key
7299 command : server /data --console-address ":9001"
73100 volumes :
74101 - minio_data:/data
75102
76103 # Optional: expose MinIO ports only if needed for UI/debugging
77- # ports:
78- # - "9000:9000"
79- # - "9001:9001"
104+ ports :
105+ - " 9000:9000"
106+ - " 9001:9001"
107+ networks :
108+ bizbuch_network :
109+ ipv4_address : 172.28.0.13
80110
81111 minio_init :
82112 image : minio/mc:latest
@@ -85,12 +115,53 @@ services:
85115 restart : " no"
86116 entrypoint : >
87117 /bin/sh -c "
88- until (/usr/bin/mc alias set myminio http://minio:9000 minioadmin minioadmin ) do sleep 2; done;
118+ until (/usr/bin/mc alias set myminio http://minio:9000 bizbuch_admin bizbuch_secret_key ) do sleep 2; done;
89119 /usr/bin/mc mb -p myminio/bizbuch || true;
90120 /usr/bin/mc anonymous set download myminio/bizbuch || true;
91121 exit 0;
92122 "
123+ networks :
124+ bizbuch_network :
125+ ipv4_address : 172.28.0.14
126+
127+ pgadmin :
128+ image : dpage/pgadmin4:latest
129+ container_name : pgadmin
130+ restart : always
131+ environment :
132+ PGADMIN_DEFAULT_EMAIL : admin@admin.com
133+ PGADMIN_DEFAULT_PASSWORD : admin
134+ PGADMIN_CONFIG_SERVER_MODE : " False"
135+ PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED : " False"
136+ ports :
137+ - " 5050:80"
138+ volumes :
139+ - ./pgadmin/servers.json:/pgadmin4/servers.json:ro
140+ depends_on :
141+ - db
142+ networks :
143+ bizbuch_network :
144+ ipv4_address : 172.28.0.16
145+
146+ # Uncomment the following section to enable Cloudflare Tunnel
147+ # tunnel:
148+ # image: cloudflare/cloudflared:latest
149+ # command: tunnel --no-autoupdate --url http://web:8000
150+ # restart: always
151+ # depends_on:
152+ # - web
153+ # networks:
154+ # bizbuch_network:
155+ # ipv4_address: 172.28.0.15
93156
94157volumes :
95158 postgres_data :
96159 minio_data :
160+
161+ networks :
162+ bizbuch_network :
163+ driver : bridge
164+ ipam :
165+ config :
166+ - subnet : 172.28.0.0/16
167+ gateway : 172.28.0.1
0 commit comments