samihsoylu / journal

Journal is a privacy first, self hosted digital log book. It is designed to be accessible anywhere you go, allowing you to organize your thoughts, feelings and opinions in one place.
GNU General Public License v3.0
68 stars 6 forks source link

Can not run docker container #36

Closed Farnsi closed 11 months ago

Farnsi commented 11 months ago

On the first start:

journal  | wait-for-it.sh: waiting 30 seconds for my-db-server.com:3306
journal  | wait-for-it.sh: my-db-server.com:3306 is available after 0 seconds
journal  | db is up or timeout reached, continuing
journal  |
journal  | In ExceptionConverter.php line 67:
journal  |
journal  |   An exception occurred while executing a query: SQLSTATE[42S22]: Column not
journal  |   found: 1054 Unknown column 't0.timezone' in 'field list'
journal  |
journal  |
journal  | In Exception.php line 28:
journal  |
journal  |   SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.timezone' in 'fi
journal  |   eld list'
journal  |
journal  |
journal  | In Connection.php line 69:
journal  |
journal  |   SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.timezone' in 'fi
journal  |   eld list'
journal  |
journal  |
journal  | migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--allow-no-migration] [--all-or-nothing [ALL-OR-NOTHING]] [                                  --configuration CONFIGURATION] [--em EM] [--conn CONN] [--] [<version>]

On the second docker-compose up i got

journal  | wait-for-it.sh: waiting 30 seconds for my-db-server.com:3306
journal  | wait-for-it.sh: my-db-server.com:3306 is available after 0 seconds
journal  | db is up or timeout reached, continuing
journal  |
journal  | In ExceptionConverter.php line 72:
journal  |
journal  |   An exception occurred while executing a query: SQLSTATE[42S21]: Column alre
journal  |   ady exists: 1060 Duplicate column name 'sortOrder'
journal  |
journal  |
journal  | In Exception.php line 28:
journal  |
journal  |   SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'sortOrd
journal  |   er'
journal  |
journal  |
journal  | In Connection.php line 69:
journal  |
journal  |   SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'sortOrd
journal  |   er'
journal  |
journal  |
journal  | migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--allow-no-migration] [--all-or-nothing [ALL-OR-NOTHING]] [                                  --configuration CONFIGURATION] [--em EM] [--conn CONN] [--] [<version>]
journal  |
journal exited with code 0

After the first start the database journal with the tables categories, entries, migrations, templates, users, widgets are created.

The table migrations contains 3 entries

version executed_at execution_time
App\Database\Migration\Version20210307220104    2023-12-12 08:34:15     58
App\Database\Migration\Version20210519195946    2023-12-12 08:34:15     12
App\Database\Migration\Version20210609111114    2023-12-12 08:34:15     27

All other tables are empty, but structure exists.

samihsoylu commented 11 months ago

Hi @Farnsi

Thanks for reporting this bug. I have looked into this, and this issue is now solved in v1.5.1.

Please delete your current version of the image with:

docker image rm samihsoylu/journal --force

And you also need to delete the broken database from your system. You can find it in:

docker volume ls

# Remove with something along the lines of (depending on the name):
docker volume rm journal_db_data

When you run docker compose up it should now work.

Do not hesitate to re-open this issue if you encounter another problem :)