docker-compose.yml<\/strong> vlo\u017e\u00edme n\u00e1sleduj\u00edc\u00ed k\u00f3d:<\/li>\n<\/ol>\n\n\n\nversion: \"3.8\"\nservices:\n\n database:\n image: mariadb:10.6.4-focal\n restart: unless-stopped\n ports:\n - 3306:3306\n env_file: .env\n environment:\n MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASSWORD}'\n MYSQL_DATABASE: '${MYSQL_DATABASE}'\n MYSQL_USER: '${MYSQL_USER}'\n MYSQL_PASSWORD: '${MYSQL_PASSWORD}'\n volumes:\n - db-data:\/var\/lib\/mysql\n networks:\n - wordpress-network\n deploy:\n resources:\n limits:\n memory: 2048m\n\n phpmyadmin:\n depends_on:\n - database\n image: phpmyadmin\/phpmyadmin\n restart: unless-stopped\n ports:\n - 8081:80\n env_file: .env\n environment:\n PMA_HOST: database\n MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASSWORD}'\n networks:\n - wordpress-network\n\n wordpress:\n depends_on:\n - database\n image: wordpress:6.2.2-apache\n restart: unless-stopped\n ports:\n - 8080:80\n env_file: .env\n environment:\n WORDPRESS_DB_HOST: database:3306 # use the same name as database service\n WORDPRESS_DB_NAME: '${MYSQL_DATABASE}'\n WORDPRESS_DB_USER: '${MYSQL_USER}'\n WORDPRESS_DB_PASSWORD: '${MYSQL_PASSWORD}'\n volumes:\n - .\/wp-content:\/var\/www\/html\/wp-content\n networks:\n - wordpress-network\n\nvolumes:\n db-data:\n\nnetworks:\n wordpress-network:\n driver: bridge <\/code><\/pre>\n\n\n\n\nDo souboru .env<\/strong> d\u00e1le vlo\u017e\u00edme:<\/li>\n<\/ol>\n\n\n\nMYSQL_DATABASE=wordpress\nMYSQL_USER=wp_user\nMYSQL_PASSWORD=wp_password\nMYSQL_ROOT_PASSWORD=wp_password<\/code><\/pre>\n\n\n\n\nOba soubory ulo\u017e\u00edme a p\u0159ejdeme zp\u011bt do p\u0159\u00edkazov\u00e9ho \u0159\u00e1dku<\/li>\n\n\n\n V CMD<\/strong> provedeme n\u00e1sleduj\u00edc\u00ed p\u0159\u00edkaz: docker compose up<\/strong> (mus\u00edme m\u00edt spr\u00e1vn\u011b zvolenou cestu ke slo\u017ece s obsahem a z\u00e1rove\u0148 nechat spu\u0161t\u011bnou aplikaci Docker na pozad\u00ed)<\/li>\n<\/ol>\n\n\n\n <\/a><\/figure>\n\n\n\n\nP\u0159edchoz\u00edm p\u0159\u00edkazem by se n\u00e1m m\u011bli soubory p\u0159en\u00e9zt do aplikace Docker, ve kter\u00e9m by m\u011bli b\u00fdt videteln\u00e9 v podob\u011b kontejneru, kter\u00fd obsahuje v\u0161echny t\u0159i slu\u017eby:\n