add admin user
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
vincent 2021-07-10 20:59:41 +02:00
parent cedf74c4b6
commit 3e8716c8d8
3 changed files with 11 additions and 13 deletions

View File

@ -8,7 +8,7 @@ drone_gitea_always_auth: TRUE
drone_RPC_secret: secret drone_RPC_secret: secret
drone_server_host: toto:80 drone_server_host: toto:80
drone_server_proto: http drone_server_proto: http
drone_user: admin
drone_db_external: FALSE drone_db_external: FALSE
drone_db_host: 127.0.0.1:5432 drone_db_host: 127.0.0.1:5432
drone_db_name: drone drone_db_name: drone

View File

@ -7,22 +7,21 @@
- name: copy environment variable file - name: copy environment variable file
template: template:
src: drone.env.j2 src: drone.env.j2
dest: "{{drone_env_file_path}}" dest: "{{drone_env_file_path}}"
- name: create drone container - name: create drone container
docker_container: docker_container:
volumes: volumes:
- "/var/lib/drone:/data" - "/var/lib/drone:/data"
name: "{{ drone_container_name }}" name: "{{ drone_container_name }}"
image: "{{ drone_image_name }}" image: "{{ drone_image_name }}"
state: started state: started
env_file: "{{drone_env_file_path}}" env_file: "{{drone_env_file_path}}"
restart: yes restart: yes
restart_policy: 'unless-stopped' restart_policy: "unless-stopped"
published_ports: "{{ drone_port }}" published_ports: "{{ drone_port }}"
- name: create drone docker runner container - name: create drone docker runner container
docker_container: docker_container:
name: "{{ drone_runner_container_name }}" name: "{{ drone_runner_container_name }}"
@ -30,6 +29,5 @@
state: started state: started
env_file: "{{drone_env_file_path}}" env_file: "{{drone_env_file_path}}"
restart: yes restart: yes
restart_policy: 'unless-stopped' restart_policy: "unless-stopped"
volumes: "{{ drone_docker_socket }}:/var/run/docker.sock" volumes: "{{ drone_docker_socket }}:/var/run/docker.sock"

View File

@ -9,6 +9,6 @@ DRONE_SERVER_HOST={{drone_server_host}}
DRONE_SERVER_PROTO={{drone_server_proto}} DRONE_SERVER_PROTO={{drone_server_proto}}
{% if drone_db_external and drone_db_host and drone_db_name and drone_db_name %} {% if drone_db_external and drone_db_host and drone_db_name and drone_db_name %}
DRONE_DATABASE_DRIVER=postgres DRONE_DATABASE_DRIVER=postgres
DRONE_DATABASE_DATASOURCE=postgres://{{drone_db_user}}:{{drone_db_password|urlencode()}}@{{drone_db_host}}/{{drone_db_name}}?sslmode=disable DRONE_DATABASE_DATASOURCE=postgres://{{drone_db_user}}:{{drone_db_password|urlencode()}}@{{drone_db_host}}/{{drone_db_name}}?sslmode=disable
{% endif%} {% endif%}
DRONE_USER_CREATE=username:{{drone_user}},admin:true