Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker compose script fails to setup database tables/schemas #22

Closed
Technifocal opened this issue Jun 30, 2019 · 3 comments
Closed

Docker compose script fails to setup database tables/schemas #22

Technifocal opened this issue Jun 30, 2019 · 3 comments
Labels
my-dojo Something related to my-dojo

Comments

@Technifocal
Copy link

Technifocal commented Jun 30, 2019

After a lot of failures (:cry:) I've concluded that the docker-compose script does not actually setup a operational Dojo stack.

1_db.sql.tpl gets copied to 1_db.sql here and then is never used again. This means that the database is at no point initialized and thus the entity of Dojo doesn't work (Oops, guess I'm the first non-dev user! 👀).

I assume this code should also contain another block above that is roughly:

if [ -f /docker-entrypoint-initdb.d/1_db.sql ]; then
  mysql -h"db" -u"root" -p"$MYSQL_ROOT_PASSWORD" "$MYSQL_DATABASE" < /docker-entrypoint-initdb.d/1_db.sql
  echo "Updated database with 1_db.sql"
fi
@kenshin-samourai
Copy link
Contributor

database initialization during first install of dojo is a 3 steps process:
1/ 1_db.sql.tpl gets copied to 1_db.sql (here)
2/ 1_db.sql gets copied into the /docker-entrypoint-initdb.d directory of the mysql container (here)
3/ 1_db.sql is executed (here)

the last step is a feature provided by the mysql docker image (see section "Initializing a fresh instance" of this page)

this process has been tested by non-dev users. it's likely that your "failures" have another cause.

@Technifocal
Copy link
Author

I'm beyond stupid. I completely forgot I swapped mysql to mariadb. Sorry for wasting your time.

@kenshin-samourai
Copy link
Contributor

no problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
my-dojo Something related to my-dojo
Projects
None yet
Development

No branches or pull requests

2 participants