If you want to contribute to traQ, then follow this section.
- git
- bash
- mise
- Docker with the Compose plugin (
docker compose)
Go and the development tools are installed by mise at the versions specified in
mise.toml. Running the tests also requires a C compiler for
the Go race detector (-race).
Use mise to install Go, wire, mockgen, and
golangci-lint at the versions specified in mise.toml:
mise trust
mise install
mise run initRun development tasks with mise run <task>, for example mise run traQ,
mise run gogen, or mise run lint. Run mise run help to list the tasks.
The mise init task downloads Go module dependencies; tools are managed by
mise install. Docker with Compose must be installed separately; spectral and
tbls run through Docker.
mise run up
Now you can access to
http://localhost:3000for traQ- admin user id:
traq - admin user password:
traq
- admin user id:
http://localhost:3001for Adminerhttp://localhost:6060for traQ pprof web interface3002/tcpfor traQ MariaDB- username:
root - password:
password - database:
traq
- username:
mise run up
mise run down
mise run down- Remove respective directory in
./dev/data(e.g. to remove allrm -r ./dev/data/*) mise run up
mise run traQ
mise run init
mise run gogen
- Setup test DB container by
mise run up-test-db mise run test- (Remove test DB container by
mise run rm-test-db)
mise run lint (or individually mise run golangci-lint, mise run swagger-lint)
Powered by:
- golangci-lint for go codes (installed by mise)
- spectral for swagger specs
If your changelist alters the database schema, you should regenerate db docs.
- Write new schema descriptions in
.tbls.yml. - Make sure the Test DB Container is running (run
mise run up-test-db). mise run db-gen-docs
Powered by:
- tbls for generating schema docs
mise run up starts RustFS and creates the traq bucket with the development
credentials in compose.yaml. The S3 endpoint is http://localhost:9000
(http://s3:9000 inside Compose), the web console is http://localhost:9001,
and the region is ap-northeast-1. Persistent data is stored in the rustfs
volume. Run storage tests with go test ./utils/storage.
The old MinIO s3 volume cannot be reused by RustFS. Complete the copy before
replacing the old MinIO deployment with this revision:
- In the old revision, stop only the backend (
docker compose stop backend) and back up the database and MinIOs3volume. Keep MinIO running as the source. - Provision RustFS at a separate endpoint and create its
traqbucket. - Configure rclone S3 remotes named
old-minioandrustfswith their explicit endpoints and regionap-northeast-1. Use S3 providerMinioforold-minioandOtherforrustfs, and setforce_path_style = truefor the RustFS remote. - Run
rclone copy old-minio:traq rustfs:traq --metadata, followed byrclone check old-minio:traq rustfs:traq --downloadto verify object contents. - Export metadata with
rclone lsjson old-minio:traq --recursive --metadataandrclone lsjson rustfs:traq --recursive --metadata, then compare each object'sPath,MimeType, and thecontent-typeandcontent-dispositionentries inMetadata. - After verification succeeds, deploy this revision, point traQ at RustFS, start the backend, and check existing attachments. Keep the MinIO backup until the migration is confirmed.