initial commit
This commit is contained in:
30
.env.sample
Normal file
30
.env.sample
Normal file
@ -0,0 +1,30 @@
|
||||
TYPE=akaunting
|
||||
|
||||
DOMAIN=akaunting.example.com
|
||||
|
||||
COMPOSE_FILE="compose.yml"
|
||||
|
||||
## Domain aliases
|
||||
#EXTRA_DOMAINS=', `www.akaunting.example.com`'
|
||||
|
||||
## Automatically use subdomains under following domain (anything.example.com)
|
||||
#WILDCARD_DOMAIN='example.com'
|
||||
|
||||
LETS_ENCRYPT_ENV=production
|
||||
|
||||
# You should change this to match your reverse proxy protocol, DNS name and port (if non standard port is used)
|
||||
LOCALE=en-US
|
||||
|
||||
# Don't change this unless you rename your database container or use rootless podman, in case of using rootless podman you should set it to 127.0.0.1 (NOT localhost)
|
||||
DB_HOST=akaunting-db
|
||||
DB_PORT=3306
|
||||
|
||||
# These define the first company to exist on this instance. They are only used during setup.
|
||||
COMPANY_NAME=My Company
|
||||
COMPANY_EMAIL=my@company.com
|
||||
|
||||
# This will be the first administrative user created on setup.
|
||||
ADMIN_EMAIL=me@company.com
|
||||
|
||||
SECRET_MYSQL_PASSWORD_VERSION=v1
|
||||
SECRET_ADMIN_PASSWORD_VERSION=v1
|
||||
24
README.md
Normal file
24
README.md
Normal file
@ -0,0 +1,24 @@
|
||||
# akaunting
|
||||
|
||||
> One line description of the recipe
|
||||
|
||||
<!-- metadata -->
|
||||
|
||||
* **Category**: Apps
|
||||
* **Status**: 0
|
||||
* **Image**: [`akaunting`](https://hub.docker.com/r/akaunting), 4, upstream
|
||||
* **Healthcheck**: No
|
||||
* **Backups**: No
|
||||
* **Email**: No
|
||||
* **Tests**: No
|
||||
* **SSO**: No
|
||||
|
||||
<!-- endmetadata -->
|
||||
|
||||
## Quick start
|
||||
|
||||
* `abra app new akaunting --secrets`
|
||||
* `abra app config <app-name>`
|
||||
* `abra app deploy <app-name>`
|
||||
|
||||
For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).
|
||||
3
abra.sh
Executable file
3
abra.sh
Executable file
@ -0,0 +1,3 @@
|
||||
# Set any config versions here
|
||||
# Docs: https://docs.coopcloud.tech/maintainers/handbook/#manage-configs
|
||||
export APP_ENTRYPOINT_VERSION=v1
|
||||
85
compose.yml
Normal file
85
compose.yml
Normal file
@ -0,0 +1,85 @@
|
||||
---
|
||||
services:
|
||||
app:
|
||||
image: docker.io/akaunting/akaunting:latest
|
||||
networks:
|
||||
- proxy
|
||||
environment:
|
||||
- APP_URL=https://${DOMAIN}
|
||||
- DB_HOST=akaunting-db
|
||||
- DB_PORT=3306
|
||||
- DB_NAME=akaunting
|
||||
- DB_USERNAME=admin
|
||||
- DB_PREFIX=asd_
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
|
||||
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
|
||||
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
||||
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||
## Redirect from EXTRA_DOMAINS to DOMAIN
|
||||
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
||||
## Redirect HTTP to HTTPS
|
||||
# - "traefik.http.middlewares.${STACK_NAME}-redirect.redirectscheme.scheme=https"
|
||||
# - "traefik.http.middlewares.${STACK_NAME}-redirect.redirectscheme.permanent=true"
|
||||
## When you're ready for release, run "abra recipe sync <name>" to set this
|
||||
- "coop-cloud.${STACK_NAME}.version="
|
||||
## Enable backups: https://docs.coopcloud.tech/maintainers/handbook/#how-do-i-configure-backuprestore
|
||||
# - "backupbot.backup=true"
|
||||
# - "backupbot.backup.path=/some/path"
|
||||
# healthcheck:
|
||||
# test: ["CMD", "curl", "-f", "http://localhost"]
|
||||
# interval: 30s
|
||||
# timeout: 10s
|
||||
# retries: 10
|
||||
# start_period: 1m
|
||||
volumes:
|
||||
- akaunting-data:/var/www/html
|
||||
secrets:
|
||||
- mysql_password
|
||||
- admin_password
|
||||
configs:
|
||||
- source: app_entrypoint
|
||||
target: /docker-entrypoint.sh
|
||||
mode: 0555
|
||||
entrypoint:
|
||||
/docker-entrypoint.sh
|
||||
|
||||
akaunting-db:
|
||||
image: mariadb:12
|
||||
volumes:
|
||||
- akaunting-db:/var/lib/mysql
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
environment:
|
||||
- MYSQL_DATABASE=akaunting
|
||||
- MYSQL_USER=admin
|
||||
- MYSQL_PASSWORD_FILE=/run/secrets/mysql_password
|
||||
- MYSQL_RANDOM_ROOT_PASSWORD=yes
|
||||
secrets:
|
||||
- mysql_password
|
||||
|
||||
volumes:
|
||||
akaunting-db:
|
||||
akaunting-data:
|
||||
|
||||
secrets:
|
||||
mysql_password:
|
||||
external: true
|
||||
name: ${STACK_NAME}_mysql_password_${SECRET_MYSQL_PASSWORD_VERSION}
|
||||
admin_password:
|
||||
external: true
|
||||
name: ${STACK_NAME}_admin_password_${SECRET_ADMIN_PASSWORD_VERSION}
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
|
||||
configs:
|
||||
app_entrypoint:
|
||||
name: ${STACK_NAME}_app_entrypoint_${APP_ENTRYPOINT_VERSION}
|
||||
file: docker-entrypoint.sh
|
||||
29
docker-entrypoint.sh
Normal file
29
docker-entrypoint.sh
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
file_env() {
|
||||
local var="$1"
|
||||
local fileVar="${var}_FILE"
|
||||
local def="${2:-}"
|
||||
|
||||
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
|
||||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local val="$def"
|
||||
if [ "${!var:-}" ]; then
|
||||
val="${!var}"
|
||||
elif [ "${!fileVar:-}" ]; then
|
||||
val="$(<"${!fileVar}")"
|
||||
fi
|
||||
|
||||
export "$var"="$val"
|
||||
unset "$fileVar"
|
||||
}
|
||||
|
||||
file_env "MYSQL_PASSWORD"
|
||||
file_env "ADMIN_PASSWORD"
|
||||
|
||||
/usr/local/bin/akaunting.sh --start
|
||||
0
release/.git-keep-me
Normal file
0
release/.git-keep-me
Normal file
Reference in New Issue
Block a user