This commit is contained in:
parent
00761ce8bc
commit
a30dda5ce7
@ -14,8 +14,7 @@
|
||||
traefik.frontend.rule: "Host:{{ draft_name }}.bouquins.www.meutel.net"
|
||||
networks:
|
||||
name: proxybackend
|
||||
# TODO volumes
|
||||
volumes_from:
|
||||
- mydata
|
||||
volumes:
|
||||
- bouquins_draft:/root/data
|
||||
|
||||
# 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
|
35
.drone.yml
35
.drone.yml
@ -45,7 +45,6 @@ steps:
|
||||
registry: reg.meutel.net
|
||||
repo: reg.meutel.net/go-bouquins
|
||||
tags: ${DRONE_BRANCH##feature/}
|
||||
debug: true
|
||||
username:
|
||||
from_secret: registry_login
|
||||
password:
|
||||
@ -54,32 +53,26 @@ steps:
|
||||
branch:
|
||||
- feature/*
|
||||
|
||||
- name: deploy-branch
|
||||
image: plugins/ansible:1
|
||||
environment:
|
||||
draft_name: ${DRONE_BRANCH##feature/}
|
||||
settings:
|
||||
playbook: .ansible/deploy-draft.yml
|
||||
inventory: .ansible/inventory
|
||||
private_key:
|
||||
from_secret: drone_ssh_key
|
||||
when:
|
||||
branch:
|
||||
- feature/*
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: ssh
|
||||
name: deploy
|
||||
|
||||
server:
|
||||
host: meutel.net
|
||||
user: drone
|
||||
ssh_key:
|
||||
from_secret: drone_ssh_key
|
||||
|
||||
steps:
|
||||
- name: deploy-branch
|
||||
commands:
|
||||
- id
|
||||
|
||||
depends_on:
|
||||
- default
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: 2432bc54b5194625c455761323cb615cc117611ee9af4639f9b3463824f158fa
|
||||
hmac: 7a0b174d395933fd3e9826391addd09db9272668e77291f78d23528b370c1cf4
|
||||
|
||||
...
|
||||
|
4
main.go
4
main.go
@ -32,13 +32,13 @@ func ReadConfig() (*bouquins.Conf, error) {
|
||||
}
|
||||
// default values
|
||||
if conf.CalibrePath == "" {
|
||||
conf.CalibrePath = "."
|
||||
conf.CalibrePath = "./data"
|
||||
}
|
||||
if conf.DbPath == "" {
|
||||
conf.DbPath = conf.CalibrePath + "/metadata.db"
|
||||
}
|
||||
if conf.UserDbPath == "" {
|
||||
conf.UserDbPath = "./users.db"
|
||||
conf.UserDbPath = "./data/users.db"
|
||||
}
|
||||
if conf.BindAddress == "" {
|
||||
conf.BindAddress = ":9000"
|
||||
|
Loading…
Reference in New Issue
Block a user