meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
wiki:docker:compose-cookbook [2022/06/14 06:49] mchuswiki:docker:compose-cookbook [2022/06/20 06:17] (current) mchus
Line 1: Line 1:
 +====== Docker Compose Cook Book ======
 +{{tag>cookbook}}
 +===== nextcloud =====
  
 +<code yaml>
 +version: '2'
 +
 +services:
 +  db:
 +    image: mariadb
 +    restart: always
 +    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
 +    volumes:
 +       - type: bind
 +         source: /srv/nextcloud/var/lib/mysql
 +         target: /var/lib/mysql
 +
 +    environment:
 +      - MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
 +      - MYSQL_PASSWORD=$MYSQL_PASSWORD
 +      - MYSQL_DATABASE=$MYSQL_DATABASE
 +      - MYSQL_USER=$MYSQL_USER
 +
 +  app:
 +    image: nextcloud:24.0-fpm
 +    restart: always
 +    links:
 +      - db
 +    volumes:
 +       - type: bind
 +         source: /srv/nextcloud/var/www/html
 +         target: /var/www/html    
 +    environment:
 +      - MYSQL_PASSWORD=$MYSQL_PASSWORD
 +      - MYSQL_DATABASE=$MYSQL_DATABASE
 +      - MYSQL_USER=$MYSQL_USER
 +      - MYSQL_HOST=db
 +
 +  web:
 +    image: nginx
 +    restart: always
 +    ports:
 +      - 8080:80
 +    links:
 +      - app
 +    volumes:
 +       - type: bind
 +         source: /srv/nextcloud/etc/nginx/nginx.conf
 +         target: /etc/nginx/nginx.conf:ro
 +    volumes_from:
 +      - app
 +</code>