-
-
Notifications
You must be signed in to change notification settings - Fork 1k
SSH sync between ssh container and app #686
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
Comments
@markshust I was having the same issue where i only saw the nginx config when connecting via ssh. I was able to fix this by moving the ssh containers definition into the main docker compose.yml and then only adding the extra files in the docker-compose.dev.yml. See the configuration below. After making this change i was able to see all the files for the M2 website. docker-compose.yml ## Mark Shust's Docker Configuration for Magento
## (https://github.com/markshust/docker-magento)
##
## Version 43.0.0
## To use SSH, see https://github.com/markshust/docker-magento#ssh
## Linux users, see https://github.com/markshust/docker-magento#linux
## If you changed the default Docker network, you may need to replace
## 172.17.0.1 in this file with the result of:
## docker network inspect bridge --format='{{(index .IPAM.Config 0).Gateway}}'
version: "3"
services:
app:
image: markoshust/magento-nginx:1.18-7
ports:
- "80:8000"
- "443:8443"
volumes: &appvolumes
- ~/.composer:/var/www/.composer:cached
- ~/.ssh/id_rsa:/var/www/.ssh/id_rsa:cached
- ~/.ssh/known_hosts:/var/www/.ssh/known_hosts:cached
- appdata:/var/www/html
- sockdata:/sock
- ssldata:/etc/nginx/certs
#extra_hosts: &appextrahosts
## Selenium support, replace "magento.test" with URL of your site
#- "magento.test:172.17.0.1"
phpfpm:
image: markoshust/magento-php:8.1-fpm-1
volumes: *appvolumes
env_file: env/phpfpm.env
#extra_hosts: *appextrahosts
ssh:
image: markoshust/ssh
ports:
- "22:22"
volumes: *appvolumes
db:
image: mariadb:10.4
command: --max_allowed_packet=64M
ports:
- "3306:3306"
env_file: env/db.env
volumes:
- dbdata:/var/lib/mysql
redis:
image: redis:6.2-alpine
ports:
- "6379:6379"
elasticsearch:
image: markoshust/magento-elasticsearch:7.16-0
ports:
- "9200:9200"
- "9300:9300"
environment:
- "discovery.type=single-node"
## Set custom heap size to avoid memory errors
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
## Avoid test failures due to small disks
## More info at https://github.com/markshust/docker-magento/issues/488
- "cluster.routing.allocation.disk.threshold_enabled=false"
- "index.blocks.read_only_allow_delete"
rabbitmq:
image: markoshust/magento-rabbitmq:3.9-0
ports:
- "15672:15672"
- "5672:5672"
volumes:
- rabbitmqdata:/var/lib/rabbitmq
env_file: env/rabbitmq.env
mailcatcher:
image: sj26/mailcatcher
ports:
- "1080:1080"
## Blackfire support, uncomment to enable
#blackfire:
# image: blackfire/blackfire:2
# ports:
# - "8307"
# env_file: env/blackfire.env
## Selenium support, uncomment to enable
#selenium:
# image: selenium/standalone-chrome-debug:3.8.1
# ports:
# - "5900:5900"
# extra_hosts: *appextrahosts
volumes:
appdata:
dbdata:
rabbitmqdata:
sockdata:
ssldata: docker-compose.dev.yml services:
app:
volumes: &appvolumes
- ./src/nginx.conf.sample:/var/www/html/nginx.conf:cached
phpfpm:
volumes: *appvolumes
ssh:
volumes: *appvolumes |
I tried placing the SSH container definition on the compose.yaml file instead of on the compose.dev.yaml file but this causes the phpfpm container to be unable to be started phpfpm crashed with the following error:
|
I don't work in this SSH method at all, however I'll tag this and take in any PR's to fix it. |
Hi, @Alphaegen. I'm Dosu, and I'm helping the docker-magento team manage their backlog. I'm marking this issue as stale. Issue Summary:
Next Steps:
Thank you for your understanding and contribution! |
Description
I've used an existing project but can't seem to sync the ssh and app containers. I have read I should have installed it with ssh instead of trying to set it up later, but because it's an existing project I'm not sure how to do that.
Steps To Reproduce
Expected Result
The ssh container using the same volume as app together with all the files.
Actual Result
Only the nginx config being present.
The text was updated successfully, but these errors were encountered: