Skip to content

MAGECLOUD-3582: [Cloud Docker] Default path during bash connection sh… #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 28, 2019

Conversation

shiftedreality
Copy link
Member

@shiftedreality shiftedreality commented May 17, 2019

…ould be /app instead of /var/www/magento

https://magento2.atlassian.net/browse/MAGECLOUD-3582

Testing

Use the next docker-compose.yml:

Have this branch cloned locally:

|-- www
   -- magento-cloud-docker
   -- cloud-project
version: '2'
services:
  db:
    image: 'mariadb:10.0'
    ports:
      - 3306
    volumes:
      - /var/lib/mysql
      - './docker/mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d'
    environment:
      - MYSQL_ROOT_PASSWORD=magento2
      - MYSQL_DATABASE=magento2
      - MYSQL_USER=magento2
      - MYSQL_PASSWORD=magento2
  redis:
    image: 'redis:3.0'
    volumes:
      - /data
    ports:
      - 6379
  elasticsearch:
    image: 'magento/magento-cloud-docker-elasticsearch:6.5'
  fpm:
    build: '../magento-cloud-docker/php/7.2-fpm'
    ports:
      - 9000
    depends_on:
      - db
    environment:
      - PHP_MEMORY_LIMIT=2048M
      - DEBUG=false
      - ENABLE_SENDMAIL=false
      - UPLOAD_MAX_FILESIZE=64M
      - MAGENTO_ROOT=/app
      - PHP_ENABLE_XDEBUG=false
      - PHP_IDE_CONFIG=serverName=magento_cloud_docker
      - XDEBUG_CONFIG=remote_host=host.docker.internal
    env_file:
      - ./.docker/config.env
    volumes:
      - 'magento:/app:ro'
      - 'magento-vendor:/app/vendor:ro'
      - 'magento-generated:/app/generated:ro'
      - 'magento-setup:/app/setup:ro'
      - 'magento-var:/app/var:delegated'
      - 'magento-etc:/app/app/etc:delegated'
      - 'magento-static:/app/pub/static:delegated'
      - 'magento-media:/app/pub/media:delegated'
  build:
    build: '../magento-cloud-docker/php/7.2-cli'
    hostname: build.magento2.docker
    depends_on:
      - db
      - redis
      - elasticsearch
    environment:
      - PHP_MEMORY_LIMIT=2048M
      - DEBUG=false
      - ENABLE_SENDMAIL=false
      - UPLOAD_MAX_FILESIZE=64M
      - MAGENTO_ROOT=/app
      - PHP_ENABLE_XDEBUG=false
      - PHP_IDE_CONFIG=serverName=magento_cloud_docker
      - XDEBUG_CONFIG=remote_host=host.docker.internal
    env_file:
      - ./.docker/config.env
    volumes:
      - 'magento:/app:rw'
      - 'magento-vendor:/app/vendor:rw'
      - 'magento-generated:/app/generated:rw'
      - 'magento-setup:/app/setup:rw'
      - 'magento-var:/app/var:delegated'
      - 'magento-etc:/app/app/etc:delegated'
      - 'magento-static:/app/pub/static:delegated'
      - 'magento-media:/app/pub/media:delegated'
      - '~/.composer/cache:/root/.composer/cache:delegated'
      - './docker/mnt:/mnt'
      - './docker/tmp:/tmp'
  deploy:
    build: '../magento-cloud-docker/php/7.2-cli'
    hostname: deploy.magento2.docker
    depends_on:
      - db
      - redis
      - elasticsearch
    environment:
      - PHP_MEMORY_LIMIT=2048M
      - DEBUG=false
      - ENABLE_SENDMAIL=false
      - UPLOAD_MAX_FILESIZE=64M
      - MAGENTO_ROOT=/app
      - PHP_ENABLE_XDEBUG=false
      - PHP_IDE_CONFIG=serverName=magento_cloud_docker
      - XDEBUG_CONFIG=remote_host=host.docker.internal
    env_file:
      - ./.docker/config.env
    volumes:
      - 'magento:/app:ro'
      - 'magento-vendor:/app/vendor:ro'
      - 'magento-generated:/app/generated:ro'
      - 'magento-setup:/app/setup:ro'
      - 'magento-var:/app/var:delegated'
      - 'magento-etc:/app/app/etc:delegated'
      - 'magento-static:/app/pub/static:delegated'
      - 'magento-media:/app/pub/media:delegated'
      - '~/.composer/cache:/root/.composer/cache:delegated'
      - './docker/mnt:/mnt'
      - './docker/tmp:/tmp'
  web:
    build: '../magento-cloud-docker/nginx/1.9'
    depends_on:
      - fpm
    environment:
      - PHP_MEMORY_LIMIT=2048M
      - DEBUG=false
      - ENABLE_SENDMAIL=false
      - UPLOAD_MAX_FILESIZE=64M
      - MAGENTO_ROOT=/app
      - PHP_ENABLE_XDEBUG=false
      - PHP_IDE_CONFIG=serverName=magento_cloud_docker
      - XDEBUG_CONFIG=remote_host=host.docker.internal
    env_file:
      - ./.docker/config.env
    volumes:
      - 'magento:/app:ro'
      - 'magento-vendor:/app/vendor:ro'
      - 'magento-generated:/app/generated:ro'
      - 'magento-setup:/app/setup:ro'
      - 'magento-var:/app/var:delegated'
      - 'magento-etc:/app/app/etc:delegated'
      - 'magento-static:/app/pub/static:delegated'
      - 'magento-media:/app/pub/media:delegated'
  varnish:
    image: 'magento/magento-cloud-docker-varnish:latest'
    environment:
      - VIRTUAL_HOST=magento2.docker
      - VIRTUAL_PORT=80
      - HTTPS_METHOD=noredirect
    ports:
      - '80:80'
    depends_on:
      - web
  tls:
    image: 'magento/magento-cloud-docker-tls:latest'
    ports:
      - '443:443'
    external_links:
      - 'varnish:varnish'
    depends_on:
      - varnish
volumes:
  magento:
    driver_opts:
      type: none
      device: '${PWD}'
      o: bind
  magento-vendor:
    driver_opts:
      type: tmpfs
      device: tmpfs
  magento-generated:
    driver_opts:
      type: tmpfs
      device: tmpfs
  magento-setup:
    driver_opts:
      type: tmpfs
      device: tmpfs
  magento-var:
    driver_opts:
      type: tmpfs
      device: tmpfs
  magento-etc:
    driver_opts:
      type: tmpfs
      device: tmpfs
  magento-static:
    driver_opts:
      type: tmpfs
      device: tmpfs
  magento-media:
    driver_opts:
      type: tmpfs
      device: tmpfs
  1. Run docker-compose build && ./bin/docker up && ./bin/docker redeploy
  2. Site works

@mveeramneni mveeramneni self-assigned this May 17, 2019
@mveeramneni
Copy link

Having issues with docker-compose build, Oleh is going to investigate more.

@mveeramneni
Copy link

QA Approved

@shiftedreality shiftedreality merged commit bc5ecae into master May 28, 2019
@shiftedreality shiftedreality deleted the MAGECLOUD-3582 branch May 28, 2019 19:28
ngreimel-lt pushed a commit to ngreimel-lt/magento-cloud-docker that referenced this pull request Jun 25, 2019
* upstream/master:
  MAGECLOUD-3357: [Cloud Docker] Changes in .magento.app.yaml should affect php modules	 (magento#25)
  MAGECLOUD-3446: Add ICU and Phonetic Plugins to Elasticsearch Docker Image (magento#26)
  MAGECLOUD-3582: [Cloud Docker] Default path during bash connection sh… (magento#24)
  MAGECLOUD-3441: [Cloud Docker] Resolve Problem with SCD on Build Phas… (magento#23)
@YPyltiai YPyltiai added Progress: accept PR/issue status Release: 1.0.0 Magento-Cloud-Docker Release and removed Progress: testing in progress labels Aug 12, 2019
mmansoor-magento pushed a commit that referenced this pull request Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Progress: accept PR/issue status Release: 1.0.0 Magento-Cloud-Docker Release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants