Skip to content

Commit bda2283

Browse files
committed
Refactor Docker Compose configuration and update PgAdmin settings
- Downgraded PgAdmin image version from 8.5 to 7. - Improved environment variable handling for PgAdmin with default values. - Removed unnecessary volume definitions and dependencies in the Docker Compose file. - Cleaned up formatting in the README for better readability.
1 parent eb30887 commit bda2283

File tree

2 files changed

+16
-29
lines changed

2 files changed

+16
-29
lines changed

README.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ services:
184184
app:
185185
build:
186186
context: .
187-
dockerfile: Dockerfile.dev
187+
dockerfile: Dockerfile.dev
188188
container_name: axum-seaorm-app
189189
ports:
190190
- "${APP_PORT}:3000"
@@ -201,30 +201,24 @@ services:
201201
- ./Cargo.toml:/app/Cargo.toml:ro
202202
- cargo_cache:/usr/local/cargo/registry
203203
- target_cache:/app/target
204-
204+
205205
pgadmin:
206-
image: dpage/pgadmin4:8.5
206+
image: dpage/pgadmin4:7
207207
container_name: axum-seaorm-pgadmin
208-
env_file:
209-
- ./.env
208+
restart: unless-stopped
210209
environment:
211-
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
212-
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
210+
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL:-admin@example.com}
211+
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD:-admin123}
213212
ports:
214-
- "${PGADMIN_PORT}:80"
213+
- "${PGADMIN_PORT:-8080}:80"
215214
depends_on:
216-
db:
217-
condition: service_healthy
218-
volumes:
219-
- pgadmin_data:/var/lib/pgadmin
220-
- ./pgadmin_storage:/var/lib/pgadmin/storage/${PGADMIN_EMAIL_ESCAPED}
215+
- db
221216
222217
volumes:
223218
postgres_data:
224219
cargo_cache:
225220
target_cache:
226-
pgadmin_data:
227-
pgadmin_storage:
221+
228222
```
229223

230224
---

docker-compose.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,20 @@ services:
4141
- ./Cargo.toml:/app/Cargo.toml:ro
4242
- cargo_cache:/usr/local/cargo/registry
4343
- target_cache:/app/target
44-
44+
4545
pgadmin:
46-
image: dpage/pgadmin4:8.5
46+
image: dpage/pgadmin4:7
4747
container_name: axum-seaorm-pgadmin
48-
env_file:
49-
- ./.env
48+
restart: unless-stopped
5049
environment:
51-
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
52-
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
50+
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL:-admin@example.com}
51+
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD:-admin123}
5352
ports:
54-
- "${PGADMIN_PORT}:80"
53+
- "${PGADMIN_PORT:-8080}:80"
5554
depends_on:
56-
db:
57-
condition: service_healthy
58-
volumes:
59-
- pgadmin_data:/var/lib/pgadmin
60-
- ./pgadmin_storage:/var/lib/pgadmin/storage/${PGADMIN_EMAIL_ESCAPED}
55+
- db
6156

6257
volumes:
6358
postgres_data:
6459
cargo_cache:
6560
target_cache:
66-
pgadmin_data:
67-
pgadmin_storage:

0 commit comments

Comments
 (0)