Created
February 25, 2021 15:00
-
-
Save noriki-nakamura/dad6239cc72606cb6a59df934e087926 to your computer and use it in GitHub Desktop.
mysql-wordpress-redmine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d | |
- ./docker-db:/var/lib/mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: mysql-root-container | |
wordpress: | |
depends_on: | |
- db | |
image: wordpress:latest | |
ports: | |
- 8001:80 | |
environment: | |
WORDPRESS_DB_HOST: db | |
WORDPRESS_DB_USER: wordpress | |
WORDPRESS_DB_PASSWORD: wordpress-container-test | |
redmine: | |
depends_on: | |
- db | |
image: redmine | |
ports: | |
- 8002:3000 | |
environment: | |
REDMINE_DB_MYSQL: db | |
REDMINE_DB_DATABASE: redmine | |
REDMINE_DB_USERNAME: redmine | |
REDMINE_DB_PASSWORD: redmine-container-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE IF NOT EXISTS wordpress; | |
GRANT ALL ON wordpress.* TO 'wordpress'@'%' IDENTIFIED BY 'wordpress-container-test'; | |
CREATE DATABASE IF NOT EXISTS redmine; | |
GRANT ALL ON redmine.* TO 'redmine'@'%' IDENTIFIED BY 'redmine-container-test'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment