I’m using docker to setup a
drone instance pointing to
gitea (which works well, I can manually login to drone using the gitea user accounts).
I have a chicken and egg problem: I want to use the
drone cli to programatically setup
drone (on initialisation). I want to add/register user/repos at startup, however I can’t connect to the server without a user access token (which requires a user).
What can I do?
- is there a convention I can use to determine a user’s access token? (e.g. is it derived from
- is there a global access token I can use? (i.e. not specific to a user)
- is there a (docker) environment parameter I can use, to set a global access token?
- if the user existed in the database, can the access token be retrieved/set from the database? (e.g. could I overwrite this field in the DB?)
... build: image: drone/drone:0.8.5 restart: always ports: - "8000:8000" - "9000:9000" volumes: - build_data:/var/lib/drone/ restart: always environment: DRONE_OPEN: "true" DRONE_ORGS: somecompany DRONE_HOST: http://build:8000 DRONE_GITEA: "true" DRONE_GITEA_URL: http://web:3000 DRONE_SECRET: abcd1234 DRONE_DATABASE_DRIVER: mysql DRONE_DATABASE_DATASOURCE: drone:drone@tcp(build_db:3306)/drone?parseTime=true ...