This is a docker-compose yml,Integrated Mariadb、phpMyAdmin、tomcat
Docker
How to start
- install docker-ce and docker-compose
- change to project directory to build and run docker
sudo docker-compose up -d --build
- use phpMyAdmin restore database (options)
- build project war file and put to
tomcat-webapps
directory - browse http://yourip:8080/warFileName
docker information
- mariadb:latest
- phpmyadmin/phpmyadmin:latest
- tomcat:8.5.49-jkd8-openjdk
default information
- tomcat manager account and password
admin / mypassword112233
- mariadb root default password
myadmin123
- phpMyAdmin default port
8088
- tomcat default port
8080
;AJP port8009
- tomcat workspace is
tomcat-webapps
jenkins Agent docker
Other
https://github.com/catyku/MariadbPhpMyAdminTomcat
version: "3.5" services: #postgres service mariadb: container_name: mariadb_container build: ./mariadb environment: MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-myadmin123} MYSQL_DATABASE: myNameDB volumes: - ./mariadb-data:/var/lib/mysql # - ./backup/data.backup:/data/data.backup networks: myNet: ipv4_address: 172.16.238.10 restart: unless-stopped #localhost:5050 phpmyadmin: container_name: phpmyadmin_container build: ./phpmyadmin environment: PMA_HOST: mariadb #PMA_ARBITRARY: 1 ports: - "${ADMIN_PORT:-8088}:80" networks: myNet: ipv4_address: 172.16.238.11 restart: unless-stopped depends_on: - mariadb tomcat: container_name: tomcat8.5 build: ./tomcat ports: - "${TOMCAT_PORT:-8080}:8080" - "${TOMCAT_AJP:-8009}:8009" volumes: - ./tomcat-webapps:/usr/local/tomcat/webapps networks: myNet: ipv4_address: 172.16.238.12 restart: unless-stopped networks: myNet: ipam: driver: default config: - subnet: "172.16.238.0/24" #volumes: # postgres: # pgadmin: # webapps:./tomcat-webapps