1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- version: '3.4'
- services:
- postgres:
- # image: 'registry.cn-hangzhou.aliyuncs.com/kennylee/postgresql:12.4'
- container_name: db_postgres
- image: postgres:16.0
- environment:
- POSTGRES_DB: chat
- POSTGRES_USER: root
- POSTGRES_PASSWORD: root1234
- ports:
- - 5432:5432
- volumes:
- - postgres-data:/var/lib/postgresql/data
- restart: unless-stopped
- networks:
- - app-network
- logging:
- driver: 'json-file'
- options:
- max-size: '12m'
- max-file: '5'
- mariadb:
- container_name: mariadb_container
- image: mariadb:10.3
- restart: always
- environment:
- MYSQL_ROOT_PASSWORD: root1234
- MYSQL_DATABASE: chat
- MYSQL_USER: lyq
- MYSQL_PASSWORD: lyq121212
- volumes:
- - ./mariadb:/var/lib/mysql
- # - ./dev/mariadb:/docker-entrypoint-initdb.d
- networks:
- - app-network
- mysql:
- container_name: mysql-container
- # image: mysql:8.1.0
- image: mysql:5.6
- restart: unless-stopped
- volumes:
- - ./mysql:/var/lib/mysql
- # - db_data:/var/lib/mysql
- environment:
- MYSQL_DATABASE: chat
- MYSQL_USER: lyq
- MYSQL_PASSWORD: lyq121212
- MYSQL_ROOT_PASSWORD: root1234
- ports:
- - 3306:3306
- networks:
- - app-network
- phpmyadmin:
- image: phpmyadmin/phpmyadmin:latest
- # image: phpmyadmin/phpmyadmin:5.2.1-fpm-alpine # has bug
- ports:
- - 8089:80
- # restart: unless-stopped
- environment:
- PMA_HOST: mysql
- # PMA_ARBITRARY: 1
- MYSQL_ROOT_PASSWORD: root1234
- depends_on:
- - mysql
- networks:
- - app-network
- adminer:
- image: adminer:latest
- ports:
- - 8080:8080
- environment:
- ADMINER_DEFAULT_SERVER: mysql
- depends_on:
- - mysql
- - postgres
- - mariadb
- networks:
- - app-network
- volumes:
- mariadb-data:
- mysql-data:
- postgres-data:
- networks:
- app-network:
- driver: bridge
|