|
@@ -0,0 +1,88 @@
|
|
|
+version: '3.4'
|
|
|
+
|
|
|
+services:
|
|
|
+
|
|
|
+ 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
|
|
|
+
|
|
|
+ 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
|