hi, i want to run 2 applications in my docker compose but i don’t succeed.
my two applications are wordpress and nextcloud.
you can see my docker-compose.yml:
version: '3'
services:
db:
image: mariadb
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
db2:
image: mariadb
volumes:
- db2_data: /var/lib/mysql/nextcloud
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
MYSQl_PASSWORD: nextcloud
wordpress:
depends_on:
- db
image: wordpress:latest
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
nextcloud:
depends_on:
- db2
image: nextcloud:latest
ports:
- "2368:85"
restart: always
environment:
NEXTCLOUD_DB_HOST: db:3306
NEXTCLOUD_DB_USER: nextcloud
NEXTCLOUD_DB_PASSWORD: nextcloud
NEXTCLOUD_DB_NAME: nextcloud
volumes:
db_data: {}
but i am not sure to my docker-compose.
and i have these errors:
thank’s for your answer