Closed khoa21214475 closed 11 months ago
I tried the default docker-compose.yml
file from this repository and added
ports:
- 2222:5432
to postgres (as you did)
after starting docker compose up
I could connect with psql
psql -h localhost -p 2222 -U chirpstack
(default password: chirpstack)
Please check you docker compose logs for this lines after a clean startup:
chirpstack-docker-postgres-1 | done
chirpstack-docker-postgres-1 | server started
chirpstack-docker-postgres-1 |
chirpstack-docker-postgres-1 | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/001-init-chirpstack.sh
chirpstack-docker-postgres-1 |
chirpstack-docker-postgres-1 | CREATE ROLE
chirpstack-docker-postgres-1 | CREATE DATABASE
chirpstack-docker-postgres-1 |
chirpstack-docker-postgres-1 |
chirpstack-docker-postgres-1 | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/002-chirpstack_extensions.sh
chirpstack-docker-postgres-1 | CREATE EXTENSION
chirpstack-docker-postgres-1 | CREATE EXTENSION
chirpstack-docker-postgres-1 |
chirpstack-docker-postgres-1 |
### docker-compose.yml
version: "3"
services: chirpstack: image: chirpstack/chirpstack:4 command: -c /etc/chirpstack restart: unless-stopped volumes:
8080:8080
chirpstack-gateway-bridge: image: chirpstack/chirpstack-gateway-bridge:4 restart: unless-stopped ports:
mosquitto
chirpstack-gateway-bridge-basicstation: image: chirpstack/chirpstack-gateway-bridge:4 restart: unless-stopped command: -c /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge-basicstation-as923.toml ports:
./configuration/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridge
chirpstack-rest-api: image: chirpstack/chirpstack-rest-api:4 restart: unless-stopped command: --server chirpstack:8080 --bind 0.0.0.0:8090 --insecure ports:
chirpstack
postgres: image: postgres:14-alpine restart: unless-stopped ports:
POSTGRES_PASSWORD=chirpstack
redis: image: redis:7-alpine restart: unless-stopped volumes:
redisdata:/data
mosquitto: image: eclipse-mosquitto:2 restart: unless-stopped ports:
volumes: postgresqldata: redisdata:
And in file "chirpstack.toml": dsn="postgres://chirpstack:chirpstack@$POSTGRESQL_HOST/chirpstack?sslmode=disable"
Error:
"Role "chirpstack" does not exist." "password authentication failed for user "chirpstack" "Connection matched pg_hba.conf line 100: "host all all all scram-sha-256"