Docker Setup
Project setup with Docker
To install the project locally follow the instructions below:
-
Install Docker Desktop.
-
Download MySQL dump file.
-
Move the dump file to the folder
[project root]/docker/mysql/dumps/. -
Rename the dump file to
dump.sql. -
Run
docker compose build. (from the docker directory) -
Run
docker compose up. (from the docker directory) -
Wait for mysql to import the dump and output a similar message to the docker console:
12:53:40+00:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/dump.sql
13:01:25+00:00 [Note] [Entrypoint]: Stopping temporary server
13:01:26+00:00 [Note] [Entrypoint]: Temporary server stopped
13:01:26+00:00 [Note] [Entrypoint]: MariaDB init process done. Ready for start up.
- Access application container console and run next commands:
composer install
php yii migrate
NOTE: some error might appear during migration execution. It will depends on the dump that is used. The issues can be solved just by commenting problem parts of the migrations.
- Access application using http://localhost:8080/admin-panel
See also