GET http://localhost:3000/static/data/image/6e772ab4415f.jpg
GET http://localhost:3000/static/data/images/e3d87df6-de34-4fd1-bb89-0c968f62fdc2.jpg
Cannot GET /static/data/images/e3d87df6-de34-4fd1-bb89-0c968f62fdc2.jpg
// static content
this.app.use('/static', express.static(__dirname + '/public'));
version: '3'
services:
web:
image: docker-node-express-mongoapp
build: ./
working_dir: /usr/src/app/
command: node index.js
ports:
- "3000:3000"
volumes:
- ./build:/usr/src/app
- /Users/me/Documents/data:/usr/src/app/build/public/data
- /usr/src/app/node_modules
depends_on:
- "mongo"
mongo:
image: "mongo"
ports:
- "27017:27017"
adminmongo:
image: "mrvautin/adminmongo"
ports:
- "1234:1234"
services:
web:
volumes:
- data-volume:/build/public
docker-machine create --driver generic --generic-ip-address $ip-address --generic-ssh-user $user-name $host-name
Running pre-create checks...
Creating machine...
(fornex-ut) No SSH key specified. Assuming an existing key at the default location.
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
Error getting SSH command to check if the daemon is up: ssh command error:
command : sudo docker version
err : exit status 1
output : Client:
Version: 17.09.1-ce
API version: 1.32
Go version: go1.8.3
Git commit: 19e2cf6
Built: Thu Dec 7 22:24:23 2017
OS/Arch: linux/amd64
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
docker-machine create --driver generic --generic-ip-address 'HOST_IP' fornex-ut
Creating CA: /Users/user/.docker/machine/certs/ca.pem
Creating client certificate: /Users/user/.docker/machine/certs/cert.pem
Running pre-create checks...
Creating machine...
(fornex-ut) No SSH key specified. Assuming an existing key at the default location.
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Error creating machine: Error detecting OS: Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded
Путь где лежит data на локальной машине и удаленной отличается. Тогда возможно имеет смысл использовать переменные окружения внутри compose для его установки? Нормальная практика что compose будет брать инфу откуда монтировать volume из окружения или этот момент обыгрывают иначе?