dorianim / mrbs-docker

Docker image for the meeting-room-booking-system including my modern-mrbs-theme
https://hub.docker.com/r/dorianim/mrbs
GNU Affero General Public License v3.0
19 stars 6 forks source link

Tables are not being created #12

Closed stueja closed 1 week ago

stueja commented 2 months ago

I found that, following the installation guide in README.md, the tables are not being generated.

  1. docker system prune -a
user@host:/path/to/mrbs$ docker system prune -a
WARNING! This will remove:
  - all stopped containers
  - all networks not used by at least one container
  - all images without at least one container associated to them
  - all build cache

Are you sure you want to continue? [y/N] y
Deleted Containers:
deea5e3d3287ee8e0123ba9ade3ecb77c814674724e70155ffb4efba113165ac
1d01f679a0c77f943e094b9f8d7bbcd31a0abbcaec82bf8d1cc769989819b490

Deleted Images:
untagged: dorianim/mrbs:latest
untagged: dorianim/mrbs@sha256:07f4836ab9a4a64eb7ecb82c5b722b52fcdf2c24141d8b7c01a9e80ae1d18a96
deleted: sha256:f11de0126e13dd7c44dcc419e8dc35380ff9b702f010389d913848e0825b38d9
deleted: sha256:4d233fd20d621462a7e9fed8a03fb32f879a2c8ef14236ff4cb3eb9f7f643d72
deleted: sha256:bcc4a604475536bc9a9a5db9da3405850beba2054488653e00a7245ad8963ae7
deleted: sha256:b2f9074ab9e0c18dfb64fb9978fe8389f8a172638c1b1f2df242e5e0ebf751a9
deleted: sha256:862309d7f14bd9e669595dee2c57d9a9b90135812d0cbbe54a3549117cf442bf
deleted: sha256:4999f9d7c4cd2af486141fa04683a35735649a9714ce7eb5ba3a31a37b063937
deleted: sha256:7ec6fca1175996904b25017a7e22292e95ec309a1dca521625b4ec99f6e25bc9
deleted: sha256:5f0b3c15995c67e2b36950a66a04c583f7cb94744dfa1cb39c9b861fa76cec68
deleted: sha256:fc5c7a0c78aca539ca0a6266545f7359763863bc507a1d64343dd029e0081c1c
deleted: sha256:e23eba48633834a58fe349e34caee6ad5fba27f8c2ac3ef92428c979d72dd09a
deleted: sha256:dbd184851c625688ad9619906d2853bee9a88d904ee285f84a90b9cc4105a7b9
deleted: sha256:1edcc6a8ecf15b63c0c52a058a15305c54d00aa7dccc6744b1646a39934d5c86
deleted: sha256:5175c2127795dd49244cf317140164c6e122b55ef58bc89d127971b67ae10405
deleted: sha256:cbe3522f8b3ae44b968232b20a11258a2e90b170b4cf5eeacb41d3c20788a66c

Total reclaimed space: 260.2MB
  1. create docker-compose.yml
version: "2"

services:

  mrbs-test:
    # build:
    #   dockerfile: Dockerfile
    #   context: .
    image: dorianim/mrbs
    container_name: mrbs-test
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000
      - DB_HOST=mrbs-test-db
      - DB_USER=mrbs-user
      - DB_PASS=mrbs-pass
      - DB_DATABASE=mrbs
      - DB_TYPE=mysql
    volumes:
      - ./config/mrbs:/config
      # - ./dev/modern-mrbs-theme/modern:/var/www/html/Themes/modern
        #- /var/run/docker.sock:/var/run/docker.sock:ro
    # ports:
    #   - 8888:80
    depends_on:
      - mrbs-test-db
    labels:
      traefik.enable: true
      traefik.http.services.testmrbs.loadbalancer.server.port: 80
      traefik.http.routers.testmrbs.rule: Host(`sub.domain.tld`)
      traefik.http.routers.testmrbs.entrypoints: public
      traefik.http.routers.testmrbs.service: testmrbs
      traefik.http.routers.testmrbs-secure.rule: Host(`sub.domain.tld`)
      traefik.http.routers.testmrbs-secure.entrypoints: publicsecure
      traefik.http.routers.testmrbs-secure.tls: true
      traefik.http.routers.testmrbs-secure.tls.certresolver: letsencrypt
      traefik.http.routers.testmrbs-secure.service: testmrbs
      traefik.docker.network: opennet
    networks:
      opennet:

  mrbs-test-db:
    image: docker.io/mariadb:latest
    container_name: mrbs-test-db
    environment:
      - PUID=1000
      - PGID=1000
      - MYSQL_ROOT_PASSWORD=mrbs-root-pass
      - TZ=Europe/Berlin
      - MYSQL_DATABASE=mrbs
      - MYSQL_USER=mrbs-user
      - MYSQL_PASSWORD=mrbs-pass
    volumes:
      - ./config/mysql:/var/lib/mysql
        #- /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
      opennet:
networks:
  opennet:
    name: opennet
    external: true
  1. start stack using docker-compose up --force-recreate
Pulling mrbs-test (dorianim/mrbs:)...
latest: Pulling from dorianim/mrbs
020cc38592f9: Pull complete
df25a931801a: Pull complete
a5798806c02d: Pull complete
a736f2bded47: Pull complete
6684c1045685: Pull complete
0a512ce6fce5: Pull complete
4f6eb7b04cdc: Pull complete
aee39506cdf0: Pull complete
9a01536ce0d7: Pull complete
a745d5714f3e: Pull complete
37958b2c8f93: Pull complete
ce5e40d6f4e7: Pull complete
1a95067112a7: Pull complete
Digest: sha256:07f4836ab9a4a64eb7ecb82c5b722b52fcdf2c24141d8b7c01a9e80ae1d18a96
Status: Downloaded newer image for dorianim/mrbs:latest
Creating mrbs-test-db ... done
Creating mrbs-test    ... done
Attaching to mrbs-test-db, mrbs-test
mrbs-test-db    | 2024-08-12 21:59:16+02:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.4.2+maria~ubu2404 started.
mrbs-test-db    | 2024-08-12 21:59:17+02:00 [Warn] [Entrypoint]: /sys/fs/cgroup///memory.pressure not writable, functionality unavailable to MariaDB
mrbs-test-db    | 2024-08-12 21:59:17+02:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
mrbs-test-db    | 2024-08-12 21:59:17+02:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.4.2+maria~ubu2404 started.
mrbs-test       | [migrations] started
mrbs-test       | [migrations] 01-nginx-site-confs-default: executing...
mrbs-test       | /package/admin/s6-overlay-3.1.6.2/etc/s6-rc/scripts/cont-init: line 20: /etc/cont-init.d/20-config: Permission denied
mrbs-test       | [migrations] 01-nginx-site-confs-default: succeeded
mrbs-test       | [migrations] done
mrbs-test       | /package/admin/s6-overlay-3.1.6.2/etc/s6-rc/scripts/cont-init: line 20: /etc/cont-init.d/50-config: Permission denied
mrbs-test       | ───────────────────────────────────────
mrbs-test       |   _____ __ __ _____ _____ _____ _____
mrbs-test       |  |     |  |  |   __|_   _|     |     |
mrbs-test       |  |   --|  |  |__   | | | |  |  | | | |
mrbs-test       |  |_____|_____|_____| |_| |_____|_|_|_|
mrbs-test       |        _____ __ __ _ __    ____
mrbs-test       |       | __  |  |  | |  |  |    \
mrbs-test       |       | __ -|  |  | |  |__|  |  |
mrbs-test       |       |_____|_____|_|_____|____/
mrbs-test       |
mrbs-test       |   Based on images from linuxserver.io
mrbs-test       | ───────────────────────────────────────
mrbs-test       |
mrbs-test       | To support LSIO projects visit:
mrbs-test       | https://www.linuxserver.io/donate/
mrbs-test       |
mrbs-test       | ───────────────────────────────────────
mrbs-test       | GID/UID
mrbs-test       | ───────────────────────────────────────
mrbs-test       |
mrbs-test       | User UID:    1000
mrbs-test       | User GID:    1000
mrbs-test       | ───────────────────────────────────────
mrbs-test       | Setting resolver to  127.0.0.11
mrbs-test       | Setting worker_processes to 2
mrbs-test       | generating self-signed keys in /config/keys, you can replace these with your own keys if required
mrbs-test       | .......+.+......+........+.........+.+......+++++++++++++++++++++++++++++++++++++++*..+++++++++++++++++++++++++++++++++++++++*.....+.......+............+......+............+..+.+......+...............+.....+.+..+..........+...+........+....+........+.........+.+.....+.............+.....++++++
mrbs-test       | ........................+++++++++++++++++++++++++++++++++++++++*..+++++++++++++++++++++++++++++++++++++++*.................+...+.....+.+........+......+......+.............+...+..............+......+....+.........+..+...+.+......+.......................+......+....+..+....+...+...+.........+.....+.........+.....................+...+.+..+..........+..+...+.......+.....++++++
mrbs-test       | -----
mrbs-test-db    | 2024-08-12 21:59:17+02:00 [Note] [Entrypoint]: Initializing database files
mrbs-test       | [custom-init] No custom files found, skipping...
mrbs-test       | [ls.io-init] done.
mrbs-test-db    |
mrbs-test-db    |
mrbs-test-db    | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
mrbs-test-db    | To do so, start the server, then issue the following command:
mrbs-test-db    |
mrbs-test-db    | '/usr/bin/mariadb-secure-installation'
mrbs-test-db    |
mrbs-test-db    | which will also give you the option of removing the test
mrbs-test-db    | databases and anonymous user created by default.  This is
mrbs-test-db    | strongly recommended for production servers.
mrbs-test-db    |
mrbs-test-db    | See the MariaDB Knowledgebase at https://mariadb.com/kb
mrbs-test-db    |
mrbs-test-db    | Please report any problems at https://mariadb.org/jira
mrbs-test-db    |
mrbs-test-db    | The latest information about MariaDB is available at https://mariadb.org/.
mrbs-test-db    |
mrbs-test-db    | Consider joining MariaDB's strong and vibrant community:
mrbs-test-db    | https://mariadb.org/get-involved/
mrbs-test-db    |
mrbs-test-db    | 2024-08-12 21:59:19+02:00 [Note] [Entrypoint]: Database files initialized
mrbs-test-db    | 2024-08-12 21:59:19+02:00 [Note] [Entrypoint]: Starting temporary server
mrbs-test-db    | 2024-08-12 21:59:19+02:00 [Note] [Entrypoint]: Waiting for server startup
mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] Starting MariaDB 11.4.2-MariaDB-ubu2404 source revision 3fca5ed772fb75e3e57c507edef2985f8eba5b12 as process 92
mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] InnoDB: Compressed tables use zlib 1.3
mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] InnoDB: Using transactional memory
mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] InnoDB: Number of transaction pools: 1
mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] InnoDB: Completed initialization of buffer pool
mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] InnoDB: End of log at LSN=47763
mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] InnoDB: Opened 3 undo tablespaces
mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] InnoDB: log sequence number 47763; transaction id 14
mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] Plugin 'FEEDBACK' is disabled.
mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] Plugin 'wsrep-provider' is disabled.
mrbs-test-db    | 2024-08-12 21:59:26 0 [Warning] 'user' entry 'root@844490aa121a' ignored in --skip-name-resolve mode.
mrbs-test-db    | 2024-08-12 21:59:26 0 [Warning] 'proxies_priv' entry '@% root@844490aa121a' ignored in --skip-name-resolve mode.
mrbs-test-db    | 2024-08-12 21:59:26 0 [Note] mariadbd: Event Scheduler: Loaded 0 events
mrbs-test-db    | 2024-08-12 21:59:26 0 [Note] mariadbd: ready for connections.
mrbs-test-db    | Version: '11.4.2-MariaDB-ubu2404'  socket: '/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
mrbs-test-db    | 2024-08-12 21:59:26+02:00 [Note] [Entrypoint]: Temporary server started.
mrbs-test-db    | 2024-08-12 21:59:27+02:00 [Note] [Entrypoint]: Creating database mrbs
mrbs-test-db    | 2024-08-12 21:59:27+02:00 [Note] [Entrypoint]: Creating user mrbs-user
mrbs-test-db    | 2024-08-12 21:59:27+02:00 [Note] [Entrypoint]: Giving user mrbs-user access to schema mrbs
mrbs-test-db    | 2024-08-12 21:59:27+02:00 [Note] [Entrypoint]: Securing system users (equivalent to running mysql_secure_installation)
mrbs-test-db    |
mrbs-test-db    | 2024-08-12 21:59:27+02:00 [Note] [Entrypoint]: Stopping temporary server
mrbs-test-db    | 2024-08-12 21:59:27 0 [Note] mariadbd (initiated by: unknown): Normal shutdown
mrbs-test-db    | 2024-08-12 21:59:27 0 [Note] InnoDB: FTS optimize thread exiting.
mrbs-test-db    | 2024-08-12 21:59:27 0 [Note] InnoDB: Starting shutdown...
mrbs-test-db    | 2024-08-12 21:59:27 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
mrbs-test-db    | 2024-08-12 21:59:27 0 [Note] InnoDB: Buffer pool(s) dump completed at 240812 21:59:27
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] InnoDB: Shutdown completed; log sequence number 47763; transaction id 15
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] mariadbd: Shutdown complete
mrbs-test-db    |
mrbs-test-db    | 2024-08-12 21:59:28+02:00 [Note] [Entrypoint]: Temporary server stopped
mrbs-test-db    |
mrbs-test-db    | 2024-08-12 21:59:28+02:00 [Note] [Entrypoint]: MariaDB init process done. Ready for start up.
mrbs-test-db    |
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] Starting MariaDB 11.4.2-MariaDB-ubu2404 source revision 3fca5ed772fb75e3e57c507edef2985f8eba5b12 as process 1
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] InnoDB: Compressed tables use zlib 1.3
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] InnoDB: Using transactional memory
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] InnoDB: Number of transaction pools: 1
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] InnoDB: Completed initialization of buffer pool
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] InnoDB: End of log at LSN=47763
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] InnoDB: Opened 3 undo tablespaces
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] InnoDB: log sequence number 47763; transaction id 14
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] Plugin 'FEEDBACK' is disabled.
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] Plugin 'wsrep-provider' is disabled.
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mrbs-test-db    | 2024-08-12 21:59:28 0 [Note] InnoDB: Buffer pool(s) load completed at 240812 21:59:28
mrbs-test-db    | 2024-08-12 21:59:30 0 [Note] Server socket created on IP: '0.0.0.0'.
mrbs-test-db    | 2024-08-12 21:59:30 0 [Note] Server socket created on IP: '::'.
mrbs-test-db    | 2024-08-12 21:59:30 0 [Note] mariadbd: Event Scheduler: Loaded 0 events
mrbs-test-db    | 2024-08-12 21:59:30 0 [Note] mariadbd: ready for connections.
mrbs-test-db    | Version: '11.4.2-MariaDB-ubu2404'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
^Z
[1]+  Stopped                 docker-compose up
  1. create ./config/mrbs/www/config.inc.php
<?php

/**************************************************************************
 *   MRBS Configuration File
 *   Configure this file for your site.
 *   You shouldn't have to modify anything outside this file.
 *   You can find a fully populated config file over here:
 *   https://github.com/meeting-room-booking-system/mrbs-code/blob/main/web/systemdefaults.inc.php
 *
 *   Please note:
 *   MySQL Configuration is set up automatically.
 **************************************************************************/
    $debug = true;
  1. look for tables
docker exec -it mrbs-test mysql -h mrbs-test-db -u mrbs-user -pmrbs-pass
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 11.4.2-MariaDB-ubu2404 mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mrbs               |
+--------------------+
2 rows in set (0.005 sec)

MariaDB [(none)]> use mrbs;
Database changed
MariaDB [mrbs]> show tables;
Empty set (0.001 sec)

MariaDB [mrbs]> exit;
Bye

The only hint of an error I could find is in the output of docker-compose up:

mrbs-test-db    | 2024-08-12 21:59:19 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)

How can I get mrbs-docker to install the tables?

stueja commented 2 months ago

I tinkered around with the Dockerfile and found that

dorianim commented 1 week ago

Fixed in v1.11.5-1