docs
docs copied to clipboard
Fresh setup via Docker Compose - Value too long
I'm setting up for the first time using docker-compose with pgsql.
The DB is giving me an error, which is also reflected in the server as
org.postgresql.util.PSQLException: ERROR: value too long for type character varying(60)
This happens prior to every accessing the webserver.
do you have some more details about how you setup, what version you used, etc.? some config files, some additional log output will help to clarify
I'm guessing the admin password or admin email is too long but it would be great to have confirmation for sure.
@azuravian Could you provide your docker compose file please?
Sure, here it is. Everything is either obscured in <<>> or uses the .env file for security.
version: "3.7"
services:
#TRAEFIK
traefik:
env_file:
- .env
image: traefik:latest
container_name: traefik
networks:
- t1_proxy
- teedy
command:
- "--api.insecure=true"
# Tell Traefik to discover containers using the Docker API
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --providers.docker.endpoint=unix:///var/run/docker.sock
# Set up LetsEncrypt
- --certificatesresolvers.letsencrypt.acme.dnschallenge=true
- --certificatesresolvers.letsencrypt.acme.dnschallenge.provider=cloudflare
- --certificatesresolvers.letsencrypt.acme.email=$CLOUDFLARE_EMAIL
- --certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json
- --global.checkNewVersion=true # ? Periodically check for update - (Default: true)
- --log.level=DEBUG # ? Log level - (Default: ERROR) other logging levels are DEBUG, PANIC, FATAL, ERROR, WARN, and INFO.
- --log.filePath=/logs/traefik.log # ? Log path - optional - related to volume /logs defined above
- --accessLog.filePath=/logs/access.log # ? Log path - optional - related to volume /logs defined above
- --accessLog.bufferingSize=100 # ? Log size - optional
- --providers.file.directory=/rules
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
# Set up the TLS configuration for our websecure listener
- --entrypoints.websecure.http.tls=true
- --entrypoints.websecure.http.tls.certResolver=letsencrypt
- --entrypoints.websecure.http.tls.domains[0].main=$DOMAIN
- --entrypoints.websecure.http.tls.domains[0].sans=*.$DOMAIN
- --metrics=true
- --metrics.prometheus=true
- --accesslog=true
#environment:
- CF_API_EMAIL=$CLOUDFLARE_EMAIL
- CF_API_KEY=$CLOUDFLARE_DNS_API_TOKEN
- COMPOSE_HTTP_TIMEOUT=180
labels:
- traefik.enable=true
- traefik.http.services.traefik-https.loadbalancer.server.port=8080
- traefik.http.routers.traefik-http.entrypoints=web
- traefik.http.routers.traefik-https.entrypoints=websecure
- traefik.http.routers.traefik-https.rule=Host(`traefik.$DOMAIN`)
- traefik.http.routers.traefik-https.middlewares=chain-oauth@file
- traefik.http.routers.traefik-https.service=api@internal
- traefik.http.routers.traefik-https.tls.domains[0].main=$DOMAIN
- traefik.http.routers.traefik-https.tls.domains[0].sans=*.$DOMAIN
- traefik.http.routers.traefik-https.tls.certresolver=letsencrypt
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- $DOCKERDIR/traefik/certs:/letsencrypt
- $DOCKERDIR/traefik/logs:/logs
- $DOCKERDIR/traefik/rules:/rules
restart: unless-stopped
#TEEDY
teedy:
image: sismics/docs:v1.11
container_name: teedy
restart: unless-stopped
ports:
# Map internal port to host
- 8111:8080
environment:
# Base url to be used
DOCS_BASE_URL: "https://teedy.<<mydomain>>.com"
# Set the admin email
DOCS_ADMIN_EMAIL_INIT: "<<myemail>>@gmail.com"
# Set the admin password (in this example: "superSecure")
DOCS_ADMIN_PASSWORD_INIT: $TEEDY_SECRET
DATABASE_URL: "jdbc:postgresql://teedy-db:5432/teedy"
DATABASE_USER: $TEEDY_DB_USER
DATABASE_PASSWORD: $TEEDY_DB_PASSWORD
volumes:
- /docker/teedy/data:/data
networks:
- teedy
- t1_proxy
depends_on:
- teedy-db
labels:
- "traefik.enable=true"
## Authentication
- traefik.http.routers.teedy-https.entrypoints=websecure
- traefik.http.routers.teedy-https.tls=true
- traefik.http.routers.teedy-https.priority=99
- traefik.http.routers.teedy-https.rule=Host(`teedy.$DOMAIN`)
- traefik.http.routers.teedy-https.tls.certresolver=letsencrypt
## Services
- traefik.http.services.teedy.loadbalancer.server.port=8080
- traefik.http.routers.teedy-http.service=teedy
# DB for Teedy
teedy-db:
container_name: teedy-db
image: postgres:13.1-alpine
restart: unless-stopped
expose:
- 5432
environment:
POSTGRES_USER: $TEEDY_DB_USER
POSTGRES_PASSWORD: $TEEDY_DB_PASSWORD
POSTGRES_DB: "teedy"
volumes:
- /docker/teedy/db:/var/lib/postgresql/data
networks:
- teedy
I am able to access the page on my domain, but unable to login (invalid username/password).
how long is the variable "$TEEDY_SECRET" ?
LOL, 80 characters. I reduced it and no longer get the error, but still can't login with the DOCS_ADMIN_EMAIL_INIT and DOCS_ADMIN_PASSWORD_INIT. Do I have to do something to create an account first?