DBFlute Intro Official Docker Image !
1.1K
Dockerfile linksIf you want just to run DBFlute Intro, execute next command and access localhost:8926 with your browser.
$ docker run -p 8926:8926 dbflute/dbflute-intro:latest
If you are new to DBFlute, this section is suitable for you.
$ docker run -p 8926:8926 \
-v $(pwd)/dbflute_intro:/app dbflute/dbflute-intro:latest
http://0.0.0.0:8926/#welcomeyour-project-dir
|-...
|
|-dbflute_intro
| |-dbflute_{your_client}
| |-dbflute-intro.jar
| |-mydbflute
|
// .gitignore
// ... your configurations
dbflute-intro.jar
If you already have dbflute engine (mydbflute) and dbflute client (dbflute_xxx) in your local machine, this section is suitable for you. This section brings you to start DBFlute Intro and enable it to access the local resources.
For instance, consider a case that you have your own project, your-project-dir, and the directory structure is below.
your-project-dir
|-...
|
|-dbflute_xxx
| |-dfprop
| |-log
| |-...
|
|-dbflute_yyy
| |-dfprop
| |-log
| |-...
|
|-mydbflute
|-dbflute-1.x.x
|-dbflute-1.x.y
Change directory to the project root and execute next command.
$ docker run -p 8926:8926 \
-v $(pwd)/dbflute_xxx:/app/dbflute_xxx \
-v $(pwd)/dbflute_yyy:/app/dbflute_yyy \
-v $(pwd)/mydbflute:/app/mydbflute dbflute/dbflute-intro:latest
In many cases, you need to run not only DBFlute Intro but also other middlewares at the same time. Then one of excellent solutions is docker compose. Next is an example of docker-compose.yml, which starts DBFlute Intro and MySQL.
version: '2'
services:
intro: ######################################################### DBFlute-Intro
image: dbflute/dbflute-intro
ports:
- "8926:8926"
volumes:
- ./dbflute_xxx:/app/dbflute_xxx/:rw
- ./dbflute_yyy:/app/dbflute_yyy/:rw
- ./mydbflute:/app/mydbflute/:rw
- ./src:/app/src/:ro
environment:
DBFLUTE_ENVIRONMENT_TYPE: "docker"
links:
- db
networks:
- fortress-net
db: ############################################################ MySQL
container_name: fortress-mysql
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: "xxx"
MYSQL_USER: "root"
expose:
- "3306"
ports:
- "3306:3306"
networks:
- fortress-net
networks:
fortress-net:
driver: bridge
To enable dbflute client to access the MySQL database, some settings are necessary. We would like to refer some lines from above yml file.
environment:
DBFLUTE_ENVIRONMENT_TYPE: "docker"
These lines set DBFlute environment variable.
Then, you need to create directory, docker, in dfprop directory and locate some dfprop files.
your-project-dir
|-...
|
|-dbflute_xxx
| |-dfprop
| | |-docker ☆
| | | |-replaceSchemaMap.dfprop ☆
| | | |-databaseInfoMap.dfprop ☆
| | |-replaceSchemaMap.dfprop
| | |-databaseInfoMap.dfprop
| |-...
|
|-mydbflute
| |-dbflute-1.x.x
|-docker-compose.yml
map:{
; additionalUserMap = map:{
; system = map:{
; url = jdbc:mysql://fortress-mysql
; user = root
; password =
}
}
}
map:{
; driver = com.mysql.jdbc.Driver
; url = jdbc:mysql://fortress-mysql/xxx
; schema =
; user = root
; password =
}
https://github.com/lastaflute/lastaflute-test-fortress
Next commands start sample web application, MySQL and DBFlute Intro.
$ cd path/to/lastaflute-test-fortress
$ mvn package
$ docker-compose up
Content type
Image
Digest
Size
257 MB
Last updated
about 4 years ago
docker pull dbflute/dbflute-intro