feature/build_branch #7
26
.ansible/deploy-draft.yml
Normal file
26
.ansible/deploy-draft.yml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
- hosts: docker
|
||||||
|
tasks:
|
||||||
|
- name: deploy draft
|
||||||
|
docker_container:
|
||||||
|
name: "bouquins_draft_{{ draft_name }}"
|
||||||
|
image: "reg.meutel.net/go-bouquins:{{ draft_name }}"
|
||||||
|
state: started
|
||||||
|
recreate: yes
|
||||||
|
labels:
|
||||||
|
traefik.enable: 'true'
|
||||||
|
traefik.port: '9000'
|
||||||
|
traefik.docker.network: 'proxybackend'
|
||||||
|
traefik.frontend.rule: "Host:{{ draft_name }}.bouquins.www.meutel.net"
|
||||||
|
traefik.frontend.entryPoints: http
|
||||||
|
networks:
|
||||||
|
- name: proxybackend
|
||||||
|
purge_networks: yes
|
||||||
|
volumes:
|
||||||
|
- bouquins_draft:/root/data
|
||||||
|
register: deploy_out
|
||||||
|
|
||||||
|
- debug:
|
||||||
|
msg: "{{ deploy_out.container }}"
|
||||||
|
|
||||||
|
# vim:ft=ansible:
|
4
.ansible/inventory
Normal file
4
.ansible/inventory
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
ambrosia ansible_host=148.251.42.122 ansible_python_interpreter=/usr/bin/python3 ansible_user=drone
|
||||||
|
|
||||||
|
[docker]
|
||||||
|
ambrosia
|
31
.drone.yml
31
.drone.yml
@ -25,7 +25,7 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- go vet ./...
|
- go vet ./...
|
||||||
|
|
||||||
- name: docker
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: reg.meutel.net
|
registry: reg.meutel.net
|
||||||
@ -39,6 +39,33 @@ steps:
|
|||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
|
- name: docker-branch
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
registry: reg.meutel.net
|
||||||
|
repo: reg.meutel.net/go-bouquins
|
||||||
|
tags: ${DRONE_BRANCH##feature/}
|
||||||
|
username:
|
||||||
|
from_secret: registry_login
|
||||||
|
password:
|
||||||
|
from_secret: registry_password
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- feature/*
|
||||||
|
|
||||||
|
- name: deploy-branch
|
||||||
|
image: plugins/ansible:1
|
||||||
|
settings:
|
||||||
|
playbook: .ansible/deploy-draft.yml
|
||||||
|
inventory: .ansible/inventory
|
||||||
|
private_key:
|
||||||
|
from_secret: drone_ssh_key
|
||||||
|
extra_vars:
|
||||||
|
- draft_name=${DRONE_BRANCH##feature/}
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- feature/*
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
@ -46,6 +73,6 @@ trigger:
|
|||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 0f5318785e361ab48470f37a93f15cb218f6f2a22dbdd2ec2f16298dd7577ada
|
hmac: 402ef53d245969c2df4d6ec14d51d3d9665856c8fa0ec8248755a209fb66ff36
|
||||||
|
|
||||||
...
|
...
|
||||||
|
20873
assets/js/vue.js
20873
assets/js/vue.js
File diff suppressed because it is too large
Load Diff
6
assets/js/vue.min.js
vendored
6
assets/js/vue.min.js
vendored
File diff suppressed because one or more lines are too long
4
main.go
4
main.go
@ -32,13 +32,13 @@ func ReadConfig() (*bouquins.Conf, error) {
|
|||||||
}
|
}
|
||||||
// default values
|
// default values
|
||||||
if conf.CalibrePath == "" {
|
if conf.CalibrePath == "" {
|
||||||
conf.CalibrePath = "."
|
conf.CalibrePath = "./data"
|
||||||
}
|
}
|
||||||
if conf.DbPath == "" {
|
if conf.DbPath == "" {
|
||||||
conf.DbPath = conf.CalibrePath + "/metadata.db"
|
conf.DbPath = conf.CalibrePath + "/metadata.db"
|
||||||
}
|
}
|
||||||
if conf.UserDbPath == "" {
|
if conf.UserDbPath == "" {
|
||||||
conf.UserDbPath = "./users.db"
|
conf.UserDbPath = "./data/users.db"
|
||||||
}
|
}
|
||||||
if conf.BindAddress == "" {
|
if conf.BindAddress == "" {
|
||||||
conf.BindAddress = ":9000"
|
conf.BindAddress = ":9000"
|
||||||
|
Loading…
Reference in New Issue
Block a user