hey scott, i have a docker compose file but my tracd command doesnt seems to work, if i run int with -d flag the container restarts all the time. Do i run the tracd command without it i get the line i posted so i am stuck at the point where both container work, i can access the db from trac container over simply python but running tracd doesnt seem to like the connection
cheers Markus Am Mi., 3. Mai 2023 um 19:27 Uhr schrieb Scott Dunt <[email protected]>: > I did it with mysql, but used a docker-compose file to create a network > and make sure both containers shared the same network: > version: "3" > services: > > TracDB: > image: mysql:5.7 > restart: always > environment: > MYSQL_ROOT_PASSWORD: pass > MYSQL_DATABASE: trac > MYSQL_USER: tracuser > MYSQL_PASSWORD: pass > ports: > - "3306:3306" > command: --character-set-server=utf8 --collation-server=utf8_bin > networks: > - TracNet > > Trac: > image: <your docker repos>/trac:latest > restart: always > volumes: > # Mount the data migrated here after'trac-admin /var/trac/ hotcopy > /home/ubuntu/TracBackup': > - /home/ec2-user/Trac/TracBackup/:/var/trac/<sitename>/ > #Had to migrate to MySQL, so 1st launch of trac container had to run this > command line > # command : sh -c "sleep 5 && trac-admin /var/trac/<sitename>/ convert_db > "mysql://tracuser:password@TracDB:3306/trac" > ports: > - "8088:80" > depends_on: > - TracDB > networks: > - TracNet > > networks: > TracNet: > > On Wednesday, May 3, 2023 at 7:44:29 AM UTC-5 Markus Rosjat wrote: > >> hi all, >> >> i try to play around a little and hit a bump in the road with using 2 >> containers formy setup. I got one container for trac and one container for >> postgresql. So far so good, if i try to connect with python from trac >> container to the postgresql one i can query data as expected but if i try >> to run tracd it tells me it can connect to the db ... here is my pseudo >> connection string in my trac.ini >> >> database = postgres://dbuser:dbpassword@dockercontainer:5432/tracdb >> >> as i said if i pass that to psycopg2.connect as proper args i can get a >> cursor and fetch data. If i try to do it with trac i get >> >> Trac Error >> >> TracError: Unable to check for upgrade of trac.db.api.DatabaseManager: >> TimeoutError: Unable to get database connection within 10 seconds. >> >> So any pointers here would be nice. >> >> cheers >> >> MArkus >> > -- > You received this message because you are subscribed to the Google Groups > "Trac Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/trac-users/d047a9c0-cdb5-48be-a18c-3ea650cc3f47n%40googlegroups.com > <https://groups.google.com/d/msgid/trac-users/d047a9c0-cdb5-48be-a18c-3ea650cc3f47n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAJ4osOnOgofH-WVtNxruTxSgH9OZfhw0Xh%3DXacz%2BF2fC%3D%3DbMzw%40mail.gmail.com.
