postgresql

This commit is contained in:
2025-11-21 13:46:08 +01:00
parent f60744317a
commit f82d145be6
2 changed files with 15 additions and 20 deletions

View File

@@ -21,7 +21,7 @@ docker run --detach --name mariadb \
-e MARIADB_ROOT_PASSWORD=my-secret-pw \ -e MARIADB_ROOT_PASSWORD=my-secret-pw \
--network mariadb_net \ --network mariadb_net \
-p 3306:3306 \ -p 3306:3306 \
-v mariadb_data:/var/lib/mysql \ -v "mariadb_data:/var/lib/mysql" \
mariadb:12.0 mariadb:12.0
``` ```

View File

@@ -29,28 +29,23 @@ docker run --detach --name pgsql \
## pgAdmin ## pgAdmin
```shell
docker run --detach --name pgadmin \
--network pgsql_net \
--network proxy_net \
-v "pgadmin:/var/lib/pgadmin/" \
-e "PGADMIN_DISABLE_POSTFIX=true" \
-e "PGADMIN_DEFAULT_EMAIL=p@toto.fr" \
-e "PGADMIN_DEFAULT_PASSWORD=ChangeMe" \
--label "caddy=pgadmin.localhost" \
--label "caddy.reverse_proxy={{upstreams 80}}" \
--label "caddy.tls=internal" \
dpage/pgadmin4:9.8
```
``` ```
pgadmin:
image: dpage/pgadmin4:9.8
depends_on:
database:
condition: service_healthy
caddy:
condition: service_started
restart: "no" restart: "no"
configs: configs:
- source: pgadmin_config - source: pgadmin_config
target: /pgadmin4/servers.json target: /pgadmin4/servers.json
volumes:
- pgadmin:/var/lib/pgadmin/
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
PGADMIN_DISABLE_POSTFIX: true
networks:
- caddy_net
labels:
caddy: pgadmin.localhost
caddy.reverse_proxy: "{{upstreams 80}}"
caddy.tls: internal
``` ```