Browse Source

init-repo

pull/2/head
fedy95 4 years ago
parent
commit
3ebf73628b
  1. 48
      .drone.yml
  2. 1
      .gitignore
  3. 23
      Makefile
  4. 9
      README.md
  5. 17
      docker-compose.yml
  6. 7
      env/fireflyiii.env-dist
  7. 2
      etc/.gitignore

48
.drone.yml

@ -0,0 +1,48 @@
---
kind: pipeline
type: docker
name: pull_request
image_pull_secrets:
- dockerconfigjson
steps:
- name: lint yaml
image: registry.fedy95.com/baseimage-yamllint:latest
commands:
- yamllint -c /yamllint/relaxed.yaml docker-compose.yml
when:
event: pull_request
---
kind: pipeline
type: ssh
name: master_push
clone:
disable: true
server:
host:
from_secret: host
user:
from_secret: user
password:
from_secret: password
steps:
- name: release
commands:
- cd /home/fedy95/infra/firefly-iii
- git pull
- make restart
- name: cleanup
commands:
- cd /home/fedy95/infra/firefly-iii
- make cleanup
trigger:
branch:
- master
event:
- push
...

1
.gitignore

@ -0,0 +1 @@
/env/fireflyiii.env

23
Makefile

@ -0,0 +1,23 @@
MAKEFLAGS += --silent
.PHONY: *
REGISTRY=registry.fedy95.com
YAMLLINT_TAG=baseimage-yamllint:latest
lint: lint-yaml
LINT-YAML-CMD=docker run --rm -it -v $(PWD):/data ${REGISTRY}/${YAMLLINT_TAG}
lint-yaml:
docker pull ${REGISTRY}/${YAMLLINT_TAG}
$(LINT-YAML-CMD) docker-compose.yml
restart:
docker-compose -f docker-compose.yml pull
docker-compose -f docker-compose.yml down
docker-compose -f docker-compose.yml up -d
cleanup:
docker system prune --all --force
docker system prune --volumes --force
.DEFAULT_GOAL := lint

9
README.md

@ -1,3 +1,8 @@
### template [![Build Status](https://drone.fedy95.com/api/badges/infra/template/status.svg)](https://drone.fedy95.com/infra/template)
### firefly-iii [![Build Status](https://drone.fedy95.com/api/badges/infra/firefly-iii/status.svg)](https://drone.fedy95.com/infra/firefly-iii)
Base repository for new infra-repos
---
### services
- [docker hub](https://hub.docker.com/r/fireflyiii/core)
- [docs](https://docs.firefly-iii.org/firefly-iii)

17
docker-compose.yml

@ -0,0 +1,17 @@
---
version: "3"
services:
caddy:
image: fireflyiii/core:version-5.5.11
container_name: fireflyiii
hostname: fireflyiii
restart: always
env_file:
- env/fireflyiii.env
ports:
- "3050:8090"
volumes:
- ./etc/fireflyiii/var/www/html/storage/upload:/var/www/html/storage/upload
...

7
env/fireflyiii.env-dist

@ -0,0 +1,7 @@
APP_KEY=
DB_HOST=
DB_PORT=
DB_CONNECTION=
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=

2
etc/.gitignore

@ -0,0 +1,2 @@
*
!.gitignore