Closed TheDagger closed 7 years ago
My ultimate goal is to get my docker-compose file to work where I can just docker-compose up -d and it works as usual.
Here is my docker compose file
version: "2"
services:
dblive:
image: mysql:5.5.52
volumes:
- ./db_data_live:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: 1234
MYSQL_DATABASE: distribution_live
MYSQL_USER: adminlive
MYSQL_PASSWORD: 1234
dbdev:
image: mysql:5.5.52
volumes:
- ./db_data_dev:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: 1234
MYSQL_DATABASE: distribution_dev
MYSQL_USER: admindev
MYSQL_PASSWORD: 1234
phpmyadmin:
depends_on:
- dblive
- dbdev
image: phpmyadmin/phpmyadmin
environment:
PMA_ARBITRARY : 1
restart: always
ports:
- "8081:80"
web:
build: ./
depends_on:
- dblive
- dbdev
volumes:
- ./web:/var/www
- ./config/custom.php.ini:/etc/php5/apache2/conf.d/custom.php.ini
- ./logs/apache_error.log:/var/log/apache2/error.log
- ./logs/apache_access.log:/var/log/apache2/access.log
- ./config/apache_default.conf:/etc/apache2/sites-available/000-default.conf
- ./config/apache_default-ssl.conf:/etc/apache2/sites-available/default-ssl.conf
- ./config/ssl/apache.key:/etc/apache2/ssl/apache.key
- ./config/ssl/apache.crt:/etc/apache2/ssl/apache.crt
- ./web/public_html/livesite:/app
- ./web/public_html/devsite:/appdev
restart: always
ports:
#Standard HTTP Port
- "80:80"
#Below allows access to local computer from outside ports
- "8080:80"
#SSH Port
- "443:443"
#Below allows access to local computer from outside ports
- "4443:443"
If it helps here is an attachment to the path to my project. I am sharing the Users folder which is good enough right?
@TheDagger please edit your /etc/exports
file and please change:
-e # d4m-nfs exports
to be:
# d4m-nfs exports
Note you editor will either need your password or you will need to use sudo.
You should allow the program to be run as intended (#!/bin/bash) instead of forcing it through sh like you did above. I have added that to the README.
To run in bash type /bin/bash d4m-nfs.sh
, this seems to actually get this step to work now :). Awesome :). I was stuck on this for hours. Now to see if everything else works :).
Alright I got it all to work, some things to note for other users out there. I changed my d4m-nfs-mounts.txt file to this.
/Users:/Users:0:0
/Volumes:/Volumes
/private:/private
By doing this and adding the 0:0 it will allow connections on all ports and most importantly it will allow you to use docker-compose up -d with relative paths as if nothing had changed. It works great and super fast now. Thanks for this!
@TheDagger glad to hear that it is working now, I will close this issue.
FYI, you don't have to do /bin/bash d4m-nfs.sh
since that is again forcing a specific shell (which happens to be the right one). You actually want to run ./d4m-nfs.sh
which uses the Shebang for what shell should run it.
Thanks for letting me know, I created a nice step by step guide of how I did it for other users. I'll add this change in there tonight or tomorrow. Thanks!
http://stackoverflow.com/questions/38168130/docker-on-osx-slow-volumes/42679301#42679301
It includes pictures and everything :)
@TheDagger can you please update your post on Github to remove the mounts /Volumes and /private per: https://github.com/IFSight/d4m-nfs/commit/45f1628be62f91c5c7aaff9a97de931f5b5679fb
The error I get is something is wrong with your /etc/exports file
Here is attached image of the error I get.
/Users/josephastrahan:mnt:0:0
attachment of /tmp/d4m-mount-nfs.sh ?? (I don't think I need this right? I'm using docker-compose.yml files)
attachment of /tmp/d4m-nfs-mounts.txt
-e # d4m-nfs exports
"/Users/josephastrahan" -alldirs -mapall=501:20 localhost