computer-playbook/roles/server_docker-akaunting/README.md

99 lines
2.5 KiB
Markdown
Raw Normal View History

2022-02-01 17:20:12 +01:00
# docker akaunting
2022-08-31 20:22:56 +02:00
## new setup
2022-02-01 17:20:12 +01:00
```bash
2023-04-26 11:52:11 +02:00
cd {{path_docker_compose_files}}akaunting/
2022-02-01 17:20:12 +01:00
export COMPOSE_HTTP_TIMEOUT=600
export DOCKER_CLIENT_TIMEOUT=600
2023-04-19 00:03:13 +02:00
AKAUNTING_SETUP=true docker-compose -p akaunting up -d
2022-08-31 20:22:56 +02:00
```
Check Webinterface and then execute:
```bash
2023-04-19 00:03:13 +02:00
docker-compose down
docker-compose -p akaunting up -d
2022-02-01 17:20:12 +01:00
```
2022-08-31 20:22:56 +02:00
## administration
2022-08-31 20:22:56 +02:00
### get logs
2022-08-31 20:22:56 +02:00
```bash
docker exec -it akaunting tail -n 300 storage/logs/laravel.log
2022-08-31 20:22:56 +02:00
```
### enter akaunting container
2022-08-31 20:22:56 +02:00
```bash
docker exec -it akaunting bash
```
2022-08-31 20:22:56 +02:00
### enter database container
2022-08-31 20:22:56 +02:00
```bash
docker exec -it akaunting-db /bin/mysql -u admin --password=$akaunting_db_password akaunting
```
2022-08-31 20:22:56 +02:00
## manuel update
```bash
php artisan about
php artisan cache:clear
php artisan view:clear
php artisan migrate:status
php artisan update:all
php artisan update:db
```
2022-08-31 20:22:56 +02:00
## composer
2022-08-31 20:22:56 +02:00
```bash
curl https://getcomposer.org/download/2.4.1/composer.phar --output composer.phar
2022-08-31 20:22:56 +02:00
```
```bash
php composer.phar install
```
## full backup routine
2022-02-01 17:20:12 +01:00
2022-02-02 11:06:56 +01:00
```bash
# DO SET MANUEL VARIABLES >>
2023-03-27 02:39:11 +02:00
export akaunting_db_password=XXXXXXXXX
export backup_version=XXXXXXXXX
# << DO SET MANUEL VARIABLES
# set automatic variables
2023-03-27 02:39:11 +02:00
export machine_id="$(sha256sum /etc/machine-id)"
2022-02-02 11:06:56 +01:00
export COMPOSE_HTTP_TIMEOUT=600
export DOCKER_CLIENT_TIMEOUT=600
# destroy all containers
2023-04-26 11:52:11 +02:00
cd {{path_docker_compose_files}}akaunting/ &&
2023-04-19 00:03:13 +02:00
docker-compose down &&
docker network prune -f
# delete all volumes
docker volume rm akaunting_akaunting-data akaunting_akaunting-db akaunting_akaunting-modules
# rebuild containers
2023-04-19 00:03:13 +02:00
docker-compose pull &&
docker-compose build &&
docker-compose -p akaunting up -d --force-recreate
2022-02-02 11:06:56 +01:00
# recover all volumes
2023-04-26 14:38:02 +02:00
cd {{path_administrator_scripts}}docker-volume-backup &&
2023-04-18 15:41:14 +02:00
bash server_docker-volume-recover.sh akaunting_akaunting-modules ${machine_id:0:64} "$backup_version" &&
bash server_docker-volume-recover.sh akaunting_akaunting-data ${machine_id:0:64} "$backup_version" &&
bash server_docker-volume-recover.sh akaunting_akaunting-db ${machine_id:0:64} "$backup_version" akaunting-db "$akaunting_db_password" akaunting
```
2022-02-02 11:06:56 +01:00
## todo
- implement build when new akaunting version is set
2022-02-01 17:20:12 +01:00
## Further information
- https://github.com/akaunting/docker
2022-08-31 20:22:56 +02:00
- https://akaunting.com/forum/discussion/installation-update/updating-to-300-failed-cant-manually-update-either
- https://akaunting.com/forum/discussion/installation-update/not-able-to-update-core
- https://akaunting.com/forum/discussion/installation-update/update-to-203-not-able-to-finalize-core-installation
- https://akaunting.com/forum/discussion/installation-update/how-to-perform-manual-update-v2116