Skip to content

Commit

Permalink
Switch pgpass from mount to copy
Browse files Browse the repository at this point in the history
  • Loading branch information
muhme committed Sep 15, 2024
1 parent efd94f7 commit 9c42082
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.20
1.0.21
3 changes: 0 additions & 3 deletions docker-compose.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ services:
volumes:
# Make a server entry for 'jbt_pg'
- ./scripts/servers.json:/pgadmin4/servers.json
- ./scripts/pgpass:/pgadmin4/pgpass
# pgpass file must me only pgadmin user read & writable
entrypoint: /bin/sh -c "chmod 600 /pgadmin4/pgpass; chown pgadmin /pgadmin4/pgpass; /entrypoint.sh"
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
Expand Down
6 changes: 6 additions & 0 deletions scripts/create
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,14 @@ log "Add bash for Alpine containers"
for container in "jbt_pga" "jbt_mail"; do
docker exec -u root ${container} apk add bash || true # Who cares?
done

log "Set container prompts for base containers"
for container in "${JBT_BASE_CONTAINERS[@]}"; do
docker exec -u root "${container}" sh -c \
"echo PS1=\'${container} \# \' >> ~/.bashrc" || true # Who cares?
done

# pgpass file must me only pgadmin user read & writable
log "Create pgAdmin password file with owner pgadmin and file mask 600"
docker cp scripts/pgpass jbt_pga:/pgadmin4/pgpass
docker exec -u 0 jbt_pga bash -c "chmod 600 /pgadmin4/pgpass && chown pgadmin /pgadmin4/pgpass"

0 comments on commit 9c42082

Please sign in to comment.