Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

Can't run 3.1 with Docker

Jordi Xyz   ( User )

Commented 6 months ago

Hi there,

I am launching a brand new DB and Akaunting instances with the AKAUNTING_SETUP flag enabled. However, the akaunting container gets into an infinite loop:


Enabling module rewrite.
To activate the new configuration, you need to run:
service apache2 restart
Setting locale en-US
Creating database tables
Connecting to database akaunting@mariadb-akaunting:3306
Creating company
In CreateCompany.php line 61:

Not able to create a new user.

Setting locale en-US
Creating database tables
Connecting to database akaunting@mariadb-akaunting:3306
Creating company
In CreateCompany.php line 61:

Not able to create a new user.

Setting locale en-US
Creating database tables
Connecting to database akaunting@mariadb-akaunting:3306
Creating company
In CreateCompany.php line 61:

Not able to create a new user.

---

I am launching both this way:

sudo docker run -d --name $HOST_NAME -e MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD -e MYSQL_USER=$MYSQL_USER -e MYSQL_PASSWORD=$MYSQL_PASSWORD -e MYSQL_DATABASE=$MYSQL_DATABASE -v $VOLUME_NAME:/var/lib/mysql --restart=unless-stopped mariadb:latest

And

sudo docker run -d --name=$HOST_NAME --link $DB_HOST_NAME -p $HTTP_PORT:80 --env-file $DOT_ENV_FILE -e AKAUNTING_SETUP=true -v $VOLUME_NAME:/var/www/html/storage --restart=unless-stopped akaunting/akaunting:3.1

Jordi Xyz   ( User )

Commented 6 months ago

If I use the official Docker repository and run AKAUNTING_SETUP=true docker-compose up -d

- The containers will be created with an AKAUNTING_SETUP flag, since the docker-compose file overwrites it
- The akaunting container logs nothing and trying to visit the web results in "Oops! Page not found"

---

Cleaning up, editing docker-compose.yaml to use AKAUNTING_SETUP=true and running compose again, will get the akaunting container with the same error as before:

Enabling module rewrite.
To activate the new configuration, you need to run:
service apache2 restart
Setting locale en-US
Creating database tables
Connecting to database akaunting@akaunting-db:3306
Creating company
In CreateCompany.php line 61:

Not able to create a new user.

Jordi Xyz   ( User )

Commented 6 months ago

Can't edit above.

I meant "The containers will be created with an *empty AKAUNTING_SETUP flag"

Jordi Xyz   ( User )

Commented 6 months ago

The setup error seems to be originated at the call to $limit = $this->getAnyActionLimitOfPlan();

Irhiggs Irhiggs   ( User )

Commented 5 months ago

I am having the same problem with a fresh docker install. Were you able to find a solution?

Jordi Xyz   ( User )

Commented 5 months ago

Nothing works, I've tried about every possible combination of official and unofficial ways to self host the app to no avail. Every docker variant will fail in a different way, every community tutorial will fail in a yet different way.

Viktor Viktor   ( User )

Commented 5 months ago

Hi guys, as I am also kind of sorting some issues with Akaunting, so I had a look into your issue. I can confirm that AKAUNTING_SETUP=true cannot create the company and user, but the database gets created so I created these two rows manually and then it worked.
Company needs just id, the rest can be empty or null.
User needs id, name, email, password. The last bit might be tricky because it is some kind of a hash and I got that from my running production container.
At this point your best bet would be starting the installation with 3.0.17, going through the AKAUNTING_SETUP and then upgrading the container to the latest 3.1.2
Personally I am running 3.0.17 in production as the latest 3.1 versions do not work for me. I have filled an issue on Github if you are interested.

Tndadmin Tndadmin   ( User )

Commented 5 months ago

+1, also seeing this issue with a new install

Jordi Xyz   ( User )

Commented 5 months ago

Thank you for your feedback Viktor.
Tried with 3.x on an ARM box, but running the container will keep printing lots of deprecation warnings and eventually die, restart, die, restart, ...

> Deprecated: Return type of Symfony\Component\Finder\Iterator\FilenameFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/finder/Iterator/FilenameFilterIterator.php on line 28

And similar warnings everywhere, even at the rendered HTML's
---

Running 3.0.17 on Intel will keep producing these errors:

> Setting locale en-US
> Creating database tables
> Connecting to database akaunting@akaunting-db:3306
> Creating company
>
> In CreateCompany.php line 61:
>
> Not able to create a new user.

Jordi Xyz   ( User )

Commented 5 months ago

After a few full cleanups, and editing the ZIP's URL to use 3.0.17 and with AKAUNTING_SETUP overridden to true when running "sudo docker-compose -f v-docker-compose.yml up --build" I finally got past this step.

Navigating to the index page now I get "Oops! Page not found" and "Go to the Dashboard"

Please login or register to leave a response.

Showing 1 to 10 of 30 discussions