Database & Phpmyadmin deployment with docker and docker-compose
This deployment is production ready.
Copy default.env
to .env
cp default.env .env
then edit the .env
file to change default values.
Variable name | Default value |
---|---|
MYSQL_PASSWORD |
|
MYSQL_ROOT_PASSWORD |
kong |
MYSQL_DATABASE |
db |
MYSQL_USER |
user |
DOCKER_NETWORK |
backend |
DB_IMAGE |
mysql |
DB_VERSION |
8.2 |
sh ./randomize-password.sh
sh ./quick-start.sh
docker-compose up -d database
docker-compose up -d phpmyadmin
Now Database is running
- Phpmyadmin http://127.0.0.1:4000
Recommed to use HTTPS in production
WARNING : This may take some downtime to start a new Database version.
-
Change
DB_VERSION
in.env
file to a newer version. -
Run migration by compose down
docker-compose down
-
Start new Database version
docker-compose up -d database