TeamSpeak-Systems / ts-services

TeamSpeak 5 service collection for docker compose deployments
73 stars 5 forks source link

Migration from sqlite does not work: go-sqlite3 requires cgo to work #17

Closed LukasNalbach closed 1 year ago

LukasNalbach commented 1 year ago

When trying to migrate my TS3 Server (sqlite) as described by executing docker-compose run --rm setup --domain=/// --email=/// --migrate_driver=sqlite3 i get the following error.

INFO 2023-02-10 15:12:43 Loglevel set to info INFO 2023-02-10 15:12:43 TeamSpeak Server Setup INFO 2023-02-10 15:12:43 Setting domain (TEAMSPEAK_DOMAIN) to: /// INFO 2023-02-10 15:12:43 Setting email (EMAIL) to: /// INFO 2023-02-10 15:12:43 Using MatrixImage image: matrixdotorg/synapse:v1.61.0 INFO 2023-02-10 15:12:43 Using PostgresImage image: postgres:13-alpine INFO 2023-02-10 15:12:43 Processing .env start INFO 2023-02-10 15:12:43 Using already existing .env file: /out/.env INFO 2023-02-10 15:12:43 Processing .env done INFO 2023-02-10 15:12:43 Database setup start INFO 2023-02-10 15:12:43 trying to guess volume and network name for DB container INFO 2023-02-10 15:12:43 trying to get own container id from cgroups INFO 2023-02-10 15:12:43 found cgroup id de43de3832ed2ee7e9e2a312ccae98fe3000539fa5efb9fd84506e2d4953140b INFO 2023-02-10 15:12:43 found container id from match between cgroup and hostname INFO 2023-02-10 15:12:43 Container ID of postgres:13-alpine is 82baa0d8a2f69cfb231597b1c3b2fc9ce2e8bf36eac9fcbdfeb1729b4cc76083 INFO 2023-02-10 15:12:44 waiting for DB container to be ready INFO 2023-02-10 15:12:44 initializing Database: INFO 2023-02-10 15:12:45 setup users: INFO 2023-02-10 15:12:45 setup databases: INFO 2023-02-10 15:12:45 starting DB migration using driver sqlite3 and connection string /out/ts3server.sqlitedb INFO 2023-02-10 15:12:45 opening source database 'sqlite3' '/out/ts3server.sqlitedb' INFO 2023-02-10 15:12:45 Docker client closed FATAL 2023-02-10 15:12:45 [main.go:85] CreateDatabase: failed to create db: could not migrate old database: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub

Used versions/hash

ts-services beta-58rc18 / teamspeak_server 3.13.7

chnagy commented 1 year ago

did you find a solution for this?

qknight commented 1 year ago

You can't use --domain=/// as this is no valid domain. Same for the --email!

This is in our Dockerfile for the ts-setup:

RUN CGO_ENABLED=0 GOOS=linux go build -o bin

I accidently switched it from 1 to 0 lately. I'll fix this and report once this has been done.

qknight commented 1 year ago

In regards to the sqlite import we fixed the CGO_ENABLED and in the coming release this will be fixed. The release with the fix will be starting with beta-58rc21 and onwards.