Compare commits

...

22 Commits

Author SHA1 Message Date
aa63dec515 Fix port
All checks were successful
continuous-integration/drone/push Build is passing
2019-09-28 11:10:44 +02:00
6ff1dd9fcb fix entrypoint
All checks were successful
continuous-integration/drone/push Build is passing
2019-09-28 10:36:52 +02:00
7923c86543 start container
All checks were successful
continuous-integration/drone/push Build is passing
2019-09-28 10:26:04 +02:00
3d22f512fd fix ansible syntax
All checks were successful
continuous-integration/drone/push Build is passing
2019-09-28 10:01:01 +02:00
09dd1dbbec Fix networks, debug
Some checks failed
continuous-integration/drone/push Build is failing
2019-09-28 09:44:00 +02:00
f6b3fb92b7 Fix labels
All checks were successful
continuous-integration/drone/push Build is passing
2019-09-28 09:29:28 +02:00
814a6eae45 fix ansible container network
Some checks failed
continuous-integration/drone/push Build is failing
2019-09-28 09:21:11 +02:00
41835dab9a fix extra_vars
Some checks failed
continuous-integration/drone/push Build is failing
2019-09-28 09:10:09 +02:00
0d104775bb fix ansible var
Some checks failed
continuous-integration/drone/push Build is failing
2019-09-28 08:58:21 +02:00
a30dda5ce7 Ansible + fix default path
Some checks failed
continuous-integration/drone/push Build is failing
2019-09-27 17:53:32 +02:00
00761ce8bc Test ssh
Some checks reported errors
continuous-integration/drone/push Build was killed
2019-09-27 16:52:40 +02:00
677429a0fd sign
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2019-09-27 11:04:35 +02:00
29abd3382c WIP: ansible deploy branch
Some checks are pending
continuous-integration/drone/push Build is pending
2019-09-15 16:55:25 +02:00
586f06d484 MAJ vue.js
All checks were successful
continuous-integration/drone/push Build is passing
2019-09-15 15:14:08 +02:00
a97fe8023e fix tag
All checks were successful
continuous-integration/drone/push Build is passing
2019-09-14 11:09:50 +02:00
a4389a3212 Fix branch
Some checks failed
continuous-integration/drone/push Build is failing
2019-09-14 11:01:45 +02:00
f794d435e0 fix tags
All checks were successful
continuous-integration/drone/push Build is passing
2019-09-14 10:54:04 +02:00
7d1782dc25 Build branch
All checks were successful
continuous-integration/drone/push Build is passing
2019-09-13 12:11:41 +02:00
100429d8cd debug
Some checks reported errors
continuous-integration/drone/push Build was killed
2019-09-13 10:15:46 +02:00
0d88a88c34 fix sign
Some checks failed
continuous-integration/drone/push Build is failing
2019-09-13 09:58:10 +02:00
9c440bc1d9 Fix docker tag
Some checks reported errors
continuous-integration/drone/push Build was killed
2019-09-13 09:55:40 +02:00
4e30bfd279 Build docker rc
Some checks failed
continuous-integration/drone/push Build is failing
2019-09-13 09:42:35 +02:00
6 changed files with 11444 additions and 9500 deletions

26
.ansible/deploy-draft.yml Normal file
View 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
View File

@ -0,0 +1,4 @@
ambrosia ansible_host=148.251.42.122 ansible_python_interpreter=/usr/bin/python3 ansible_user=drone
[docker]
ambrosia

View File

@ -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
... ...

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -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"