To build a Nextcloud stack using Docker Compose, you'll need to create four separate services: MariaDB (database), Redis (cache), Apache or Nginx (web server), and PHP-FPM (PHP backend). For simplicity, we'll focus on the PHP-FPM service in this part of the exercise. Here's how you can set up the Nextcloud PHP-FPM service using Docker Compose.
Part 3: Nextcloud PHP-FPM
-
Create Directory for PHP-FPM Service
bash1$ cd ~ 2$ mkdir -p nc-php-fpm && cd nc-php-fpm -
Create
.envFileCreate a file named
.envin thenc-php-fpmdirectory with the following content:plaintext1NEXTCLOUD_ADMIN_USER=admin 2NEXTCLOUD_ADMIN_PASSWORD=nextcloudadmin 3MYSQL_HOST=nc-db # This assumes you've already set up MariaDB service in nc-db directory. 4MYSQL_DATABASE=nextcloud 5MYSQL_USER=nextcloud 6MYSQL_PASSWORD=nextcloud -
Create
docker-compose.ymlFileCreate a file
Read the full article at DEV Community
Want to create content about this topic? Use Nemati AI tools to generate articles, social posts, and more.

![[AINews] The Unreasonable Effectiveness of Closing the Loop](/_next/image?url=https%3A%2F%2Fmedia.nemati.ai%2Fmedia%2Fblog%2Fimages%2Farticles%2F600e22851bc7453b.webp&w=3840&q=75)



