E
E
Evgeny Kotov2020-06-15 16:15:40
Composer
Evgeny Kotov, 2020-06-15 16:15:40

Is everything correct when assembling containers?

There is a Task to start couple of services in open access.
Using docker.

At startup, swears at the Composer syntax

version: '3'

services:

  proxy:
    image: jwilder/nginx-proxy:alpine
    labels:
      - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"
    container_name: nextcloud-proxy
    networks:
      - internal_network
    ports:
      - 80:80
      - 443:443
    volumes:
      - ./proxy/conf.d:/etc/nginx/conf.d:rw
      - ./proxy/vhost.d:/etc/nginx/vhost.d:rw
      - ./proxy/html:/usr/share/nginx/html:rw
      - ./proxy/certs:/etc/nginx/certs:ro
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/tmp/docker.sock:ro
    restart: unless-stopped

  letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: nextcloud-letsencrypt
    depends_on:
      - proxy
    networks:
      - internal_network
    volumes:
      - ./proxy/certs:/etc/nginx/certs:rw
      - ./proxy/vhost.d:/etc/nginx/vhost.d:rw
      - ./proxy/html:/usr/share/nginx/html:rw
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
    restart: unless-stopped

  nextcloud_app:
    image: nextcloud:latest
    container_name: nextcloud-app
    networks:
      - internal_network
    depends_on:
      - letsencrypt
      - proxy
    volumes:
      - nextcloud:/var/www/html
      - ./app/config:/var/www/html/config
      - ./app/custom_apps:/var/www/html/custom_apps
      - ./app/data:/var/www/html/data
      - ./app/themes:/var/www/html/themes
      - /etc/localtime:/etc/localtime:ro
    environment:
      - VIRTUAL_HOST=service.....ru
      - LETSENCRYPT_HOST=service.....ru
      - [email protected]
    restart: unless-stopped
  xwiki:
  depends_on:
      - db
      - letsencrypt
      - proxy
    environment:
      - DB_USER=xwiki
      - DB_PASSWORD=xwiki
      - DB_DATABASE=xwiki
      - DB_HOST=xwiki-mysql-db
      - VIRTUAL_HOST=wiki.....ru
      - LETSENCRYPT_HOST=wiki.....ru
      - [email protected]
    volumes:
      - xwiki-data:/usr/local/xwiki
    networks:
      - internal_network
  db:
    image: "mysql:5.7"
    container_name: xwiki-mysql-db
    volumes:
      - ./xwiki.cnf:/etc/mysql/conf.d/xwiki.cnf
 - mysql-data:/var/lib/mysql
      - ./init.sql:/docker-entrypoint-initdb.d/init.sql
    environment:
      - MYSQL_ROOT_PASSWORD=xwiki
      - MYSQL_USER=xwiki
      - MYSQL_PASSWORD=xwiki
      - MYSQL_DATABASE=xwiki
volumes:
  nextcloud:
  xwiki-data:

networks:
  internal_network:

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sergey, 2020-06-15
kuzmin @sergueik

volumes:
        - ./xwiki.cnf:/etc/mysql/conf.d/xwiki.cnf
   - mysql-data:/var/lib/mysql
        - ./init.sql:/docker-entrypoint-initdb.d/init.sql

should become
volumes:
      - ./xwiki.cnf:/etc/mysql/conf.d/xwiki.cnf
      - mysql-data:/var/lib/mysql
      - ./init.sql:/docker-entrypoint-initdb.d/init.sql

D
Dmitry, 2020-06-15
@q2digger

the text of the error to the studio, well, without peering right away - xwiki lacks directives, at least image
and indents, of course, you need to be more careful

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question