This commit is contained in:
2023-09-26 18:14:36 -06:00
commit fb5a0fc542
443 changed files with 21892 additions and 0 deletions

110
Firefly/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: Firefly
URL: firefly.alexlebens.net
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for Firefly failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for Firefly failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Firefly succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Firefly failed.
when:
status:
- failure

142
Firefly/.env Normal file
View File

@@ -0,0 +1,142 @@
TZ=America/Denver
# App settings
SITE_OWNER=alexanderlebens@gmail.com
APP_ENV=local
APP_DEBUG=false
APP_KEY=SomeRandomStringOf32CharsExactly
APP_URL=https://firefly.alexlebens.net
APP_LOG_LEVEL=notice
AUDIT_LOG_LEVEL=info
DEFAULT_LANGUAGE=en_US
DEFAULT_LOCALE=equal
TRUSTED_PROXIES=**
LOG_CHANNEL=stack
# Used when logging to papertrail:
PAPERTRAIL_HOST=
PAPERTRAIL_PORT=
# Database credentials
DB_CONNECTION=mysql
DB_HOST=172.27.1.55
DB_PORT=3306
DB_DATABASE=firefly
DB_USERNAME=firefly
DB_PASSWORD=secret_firefly_password
MYSQL_RANDOM_ROOT_PASSWORD=yes
MYSQL_USER=firefly
MYSQL_PASSWORD=secret_firefly_password
MYSQL_DATABASE=firefly
MYSQL_USE_SSL=false
MYSQL_SSL_VERIFY_SERVER_CERT=true
MYSQL_SSL_CAPATH=/etc/ssl/certs/
MYSQL_SSL_CA=
MYSQL_SSL_CERT=
MYSQL_SSL_KEY=
MYSQL_SSL_CIPHER=
# Cache
CACHE_DRIVER=file
SESSION_DRIVER=file
REDIS_SCHEME=tcp
REDIS_PATH=
REDIS_HOST=
REDIS_PORT=
REDIS_USERNAME=
REDIS_PASSWORD=.
REDIS_DB="0"
REDIS_CACHE_DB="1"
# Cookie settings
COOKIE_PATH="/"
COOKIE_DOMAIN=
COOKIE_SECURE=false
COOKIE_SAMESITE=lax
# Mail
MAIL_MAILER=log
MAIL_HOST=null
MAIL_PORT=2525
MAIL_FROM=changeme@example.com
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
# Other mail drivers:
MAILGUN_DOMAIN=
MAILGUN_SECRET=
MAILGUN_ENDPOINT=api.mailgun.net
MANDRILL_SECRET=
SPARKPOST_SECRET=
# Firefly III can send you the following messages.
SEND_REGISTRATION_MAIL=true
SEND_ERROR_MESSAGE=true
SEND_LOGIN_NEW_IP_WARNING=true
# These messages contain (sensitive) transaction information:
SEND_REPORT_JOURNALS=true
# Set this value to true if you want to set the location
ENABLE_EXTERNAL_MAP=false
# The map will default to this location:
MAP_DEFAULT_LAT=51.983333
MAP_DEFAULT_LONG=5.916667
MAP_DEFAULT_ZOOM=6
# Firefly III authentication settings
# Firefly III supports a few authentication methods:
# - 'web' (default, uses built in DB)
# - 'remote_user_guard' for Authelia etc
# https://docs.firefly-iii.org/advanced-installation/authentication
AUTHENTICATION_GUARD=web
AUTHENTICATION_GUARD_HEADER=REMOTE_USER
AUTHENTICATION_GUARD_EMAIL=
CUSTOM_LOGOUT_URL=
# You can disable the X-Frame-Options header if it interferes with tools like Organizr.
DISABLE_FRAME_HEADER=false
# You can disable the Content Security Policy header when you're using an ancient browser
DISABLE_CSP_HEADER=false
# If you wish to track your own behavior over Firefly III, set valid analytics tracker information here.
TRACKER_SITE_ID=
TRACKER_URL=
# Firefly III supports webhooks. These are security sensitive and must be enabled manually first.
ALLOW_WEBHOOKS=false
# The static cron job token can be useful when you use Docker and wish to manage cron jobs.
STATIC_CRON_TOKEN=
# You can fine tune the start-up of a Docker container by editing these environment variables.
DKR_BUILD_LOCALE=false
DKR_CHECK_SQLITE=true
DKR_RUN_MIGRATION=true
DKR_RUN_UPGRADE=true
DKR_RUN_VERIFY=true
DKR_RUN_REPORT=true
DKR_RUN_PASSPORT_INSTALL=true
# Leave the following configuration vars as is.
# Unless you like to tinker and know what you're doing.
APP_NAME=FireflyIII
BROADCAST_DRIVER=log
QUEUE_DRIVER=sync
CACHE_PREFIX=firefly
PUSHER_KEY=
IPINFO_TOKEN=
PUSHER_SECRET=
PUSHER_ID=
DEMO_USERNAME=
DEMO_PASSWORD=
IS_HEROKU=false
FIREFLY_III_LAYOUT=v1

3
Firefly/README.md Normal file
View File

@@ -0,0 +1,3 @@
# Firefly
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/Firefly/status.svg)](https://drone.alexlebens.net/alexlebens/Firefly)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Firefly MariaDB - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://firefly.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "firefly_mariadb",
"docker_host": 1
}

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Firefly Server - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://firefly.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "firefly_server",
"docker_host": 1
}

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Firefly Plaid - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://firefly.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "firefly_plaid",
"docker_host": 1
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "Firefly - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://firefly.alexlebens.net",
"accepted_statuscodes": [
"200-299"
]
}

View File

@@ -0,0 +1,87 @@
services:
mariadb:
container_name: firefly_mariadb
env_file:
- .env
image: mariadb
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik:
ipv4_address: 172.27.1.55
restart: always
volumes:
- db:/var/lib/mysql
server:
container_name: firefly_server
depends_on:
- 'mariadb'
env_file:
- .env
image: fireflyiii/core:latest
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.firefly.entrypoints: websecure
traefik.http.routers.firefly.rule: Host(`firefly.alexlebens.net`)
traefik.http.routers.firefly.service: firefly
traefik.http.services.firefly.loadbalancer.server.port: 8080
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik:
ipv4_address: 172.27.1.56
restart: always
volumes:
- upload:/var/www/html/storage/upload
plaid_connector:
container_name: firefly_plaid
depends_on:
- 'server'
image: registry.gitlab.com/georgehahn/firefly-plaid-connector:latest
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik:
ipv4_address: 172.27.1.57
restart: always
volumes:
- config:/config
networks:
traefik:
name: traefik
external: true
volumes:
db:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/firefly_db
upload:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/firefly_upload
config:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/firefly_config