mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-24 13:41:03 +01:00
Compare commits
No commits in common. "5a7a6e5d2b9783cc5cd0e0a7225499a7c2d4705c" and "4d2e2e8acb710c4da30ad13a22407c9f6d088ca5" have entirely different histories.
5a7a6e5d2b
...
4d2e2e8acb
@ -329,7 +329,7 @@
|
||||
hosts: docker
|
||||
become: true
|
||||
roles:
|
||||
- pc-docker
|
||||
- application-docker
|
||||
|
||||
|
||||
- name: setup backup to swappable
|
||||
|
@ -5,7 +5,7 @@
|
||||
- docker-compose
|
||||
state: present
|
||||
|
||||
- name: Adding user {{client_username}} to relevant docker usergroup
|
||||
- name: Adding user {{client_username}} to relevant arduino usergroups
|
||||
user: name={{client_username}}
|
||||
groups=docker
|
||||
append=yes
|
@ -1,63 +1,41 @@
|
||||
# Docker Akaunting Setup Guide
|
||||
|
||||
## Introduction
|
||||
This guide details the process of setting up Akaunting, a free and online accounting software, using Docker. It's tailored to help you deploy and manage an Akaunting instance efficiently using Docker and Docker Compose.
|
||||
|
||||
## Better Alternatives to Akaunting
|
||||
|
||||
Due to license issues, bugs and that in the past after an akaunting update your functions get reduced, I recommend the use of other finance software.
|
||||
[GNUCASH](https://www.gnucash.org/) offers more functions for SMB's, allows tracking of bank and trading accounts and in combination with Nextcloud it's a very good tool for smal companies to manage there finances.
|
||||
|
||||
## Prerequisites
|
||||
- Docker and Docker Compose installed.
|
||||
- Basic understanding of Docker concepts.
|
||||
- Access to the command line or terminal.
|
||||
|
||||
## Installation Steps
|
||||
|
||||
### New Manual Setup
|
||||
1. **Navigate to Docker Compose Directory**: Change to the directory containing your Docker Compose files for Akaunting.
|
||||
# docker akaunting
|
||||
|
||||
## new setup
|
||||
```bash
|
||||
cd {{path_docker_compose_files}}akaunting/
|
||||
```
|
||||
|
||||
2. **Set Environment Variables**: These are necessary to prevent timeouts during long operations.
|
||||
|
||||
```bash
|
||||
export COMPOSE_HTTP_TIMEOUT=600
|
||||
export DOCKER_CLIENT_TIMEOUT=600
|
||||
```
|
||||
|
||||
3. **Start Akaunting Service**: This command will initialize the Akaunting setup.
|
||||
|
||||
```bash
|
||||
AKAUNTING_SETUP=true docker-compose -p akaunting up -d
|
||||
```
|
||||
|
||||
4. **Check Web Interface**: Ensure the web interface is operational.
|
||||
|
||||
5. **Restart Services**: To finalize the setup, restart the services.
|
||||
Check Webinterface and then execute:
|
||||
|
||||
```bash
|
||||
docker-compose down
|
||||
docker-compose -p akaunting up -d
|
||||
```
|
||||
|
||||
### Administration
|
||||
- **View Logs**: To check the latest logs of Akaunting.
|
||||
## administration
|
||||
|
||||
### get logs
|
||||
|
||||
```bash
|
||||
docker-compose exec -it akaunting tail -n 300 storage/logs/laravel.log
|
||||
```
|
||||
|
||||
- **Access Containers**: For troubleshooting or configuration.
|
||||
- Akaunting Container: `docker-compose exec -it akaunting bash`
|
||||
- Database Container: `docker-compose exec -it akaunting-db /bin/mariadb -u admin --password=$akaunting_db_password akaunting`
|
||||
### enter akaunting container
|
||||
|
||||
### Manual Update
|
||||
Execute PHP artisan commands in the following order for updating Akaunting:
|
||||
```bash
|
||||
docker-compose exec -it akaunting bash
|
||||
```
|
||||
|
||||
### enter database container
|
||||
|
||||
```bash
|
||||
docker-compose exec -it akaunting-db /bin/mysql -u admin --password=$akaunting_db_password akaunting
|
||||
```
|
||||
|
||||
## manuel update
|
||||
```bash
|
||||
php artisan about
|
||||
php artisan cache:clear
|
||||
@ -67,39 +45,55 @@ php artisan update:all
|
||||
php artisan update:db
|
||||
```
|
||||
|
||||
### Composer
|
||||
To install Composer, a PHP dependency management tool:
|
||||
|
||||
## composer
|
||||
```bash
|
||||
curl https://getcomposer.org/download/2.4.1/composer.phar --output composer.phar
|
||||
```
|
||||
|
||||
```bash
|
||||
php composer.phar install
|
||||
```
|
||||
|
||||
### Full Backup Routine
|
||||
Detailed steps for backing up your Akaunting instance, including setting manual and automatic variables, destroying containers, removing volumes, and rebuilding and recovering volumes. (Refer to the full backup routine script in the original README).
|
||||
## full backup routine
|
||||
|
||||
### Setting Variables
|
||||
Variables are crucial in configuring your Akaunting setup. Ensure you set the following variables correctly in your environment:
|
||||
```bash
|
||||
# DO SET MANUEL VARIABLES >>
|
||||
export akaunting_db_password=XXXXXXXXX
|
||||
export backup_version=XXXXXXXXX
|
||||
# << DO SET MANUEL VARIABLES
|
||||
|
||||
- `docker_compose_akaunting_path`: Set this variable to the path where your Docker Compose files for Akaunting are located.
|
||||
- `akaunting_db_password`, `akaunting_version`, `akaunting_company_name`, `akaunting_company_email`, `akaunting_setup_admin_email`, and `akaunting_setup_admin_password`: These should be set in your `.env` files as per your requirements.
|
||||
# set automatic variables
|
||||
export machine_id="$(sha256sum /etc/machine-id)"
|
||||
export COMPOSE_HTTP_TIMEOUT=600
|
||||
export DOCKER_CLIENT_TIMEOUT=600
|
||||
|
||||
### Additional Configuration
|
||||
- **SSL Certificate**: The guide includes steps to receive a certificate for your domain.
|
||||
- **Nginx Configuration**: Necessary steps to configure Nginx as a reverse proxy for Akaunting.
|
||||
- **Database and Runtime Environment**: Instructions on how to set up the `db.env` and `run.env` files for database and runtime configurations.
|
||||
# destroy all containers
|
||||
cd {{path_docker_compose_files}}akaunting/ &&
|
||||
docker-compose down &&
|
||||
docker network prune -f
|
||||
|
||||
## Further Information
|
||||
For more details, visit the [Akaunting Docker Repository](https://github.com/akaunting/docker) and the [Akaunting Forums](https://akaunting.com/forum).
|
||||
# delete all volumes
|
||||
docker volume rm akaunting_akaunting-data akaunting_akaunting-db akaunting_akaunting-modules
|
||||
|
||||
## Contribution and Feedback
|
||||
# rebuild containers
|
||||
docker-compose pull &&
|
||||
docker-compose build &&
|
||||
docker-compose -p akaunting up -d --force-recreate
|
||||
|
||||
Your contributions and feedback are welcome. Please reach out for support or queries at kevin@veen.world.
|
||||
# recover all volumes
|
||||
cd {{path_administrator_scripts}}backup-docker-to-local &&
|
||||
bash recover-docker-from-local.sh akaunting_akaunting-modules ${machine_id:0:64} "$backup_version" &&
|
||||
bash recover-docker-from-local.sh akaunting_akaunting-data ${machine_id:0:64} "$backup_version" &&
|
||||
bash recover-docker-from-local.sh akaunting_akaunting-db ${machine_id:0:64} "$backup_version" akaunting-db "$akaunting_db_password" akaunting
|
||||
|
||||
## License
|
||||
```
|
||||
|
||||
This project is licensed under the GNU Affero General Public License v3.0.
|
||||
## todo
|
||||
- implement build when new akaunting version is set
|
||||
|
||||
## Author
|
||||
|
||||
This script is developed by Kevin Veen-Birkenbach. You can reach out to him at kevin@veen.world or visit his website at https://www.veen.world.
|
||||
## Further information
|
||||
- https://github.com/akaunting/docker
|
||||
- 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
|
@ -1,32 +0,0 @@
|
||||
# README for PC-Docker Playbook
|
||||
|
||||
## Overview
|
||||
This playbook, `pc-docker`, is part of a larger collection housed within the `computer-playbook` repository. It is specifically tailored for setting up Docker and Docker Compose on personal computers (PCs) used for development purposes. The primary goal is to facilitate a development environment on individual workstations rather than configuring servers for hosting or distributing Docker images.
|
||||
|
||||
## Contents
|
||||
The `main.yml` file in the `pc-docker` role consists of two primary tasks:
|
||||
|
||||
1. **Install Docker**: This task uses the `community.general.pacman` module to install `docker` and `docker-compose` on the system. It ensures that these packages are present on the PC.
|
||||
|
||||
2. **User Group Configuration**: This task adds a specified user (denoted as `{{client_username}}`) to the Docker user group. This is crucial for allowing the specified user to interact with Docker without needing superuser permissions.
|
||||
|
||||
## Use Case
|
||||
The playbook is designed for developers who require Docker in their local development environments. It simplifies the process of Docker installation and configuration, making it straightforward for developers to start containerizing their applications without the complexities often encountered in a server or production environment.
|
||||
|
||||
## Prerequisites
|
||||
- Ansible: Ensure that Ansible is installed on your system to run this playbook.
|
||||
- Arch Linux-based System: This playbook uses the `pacman` package manager, indicating it's designed for Arch Linux-based systems.
|
||||
|
||||
## Running the Playbook
|
||||
To run this playbook:
|
||||
1. Clone the `computer-playbook` repository.
|
||||
2. Navigate to the `roles/pc-docker` directory.
|
||||
3. Run the playbook using the appropriate Ansible commands, ensuring that you have the necessary privileges.
|
||||
|
||||
## Important Notes
|
||||
- **Not for Server Use**: This playbook is not designed for server environments. It is optimized for individual development machines.
|
||||
- **Customization**: You may need to customize the playbook, especially the `{{client_username}}` variable, to suit your specific setup.
|
||||
- **Security Considerations**: While adding a user to the Docker group provides ease of use, be aware of the security implications. It grants the user elevated privileges which, if misused, can affect the entire system.
|
||||
|
||||
## Support & Contribution
|
||||
For support, suggestions, or contributions, please raise an issue or a pull request in the `computer-playbook` repository. This project welcomes contributions from the developer community.
|
Loading…
Reference in New Issue
Block a user