Answer the question
In order to leave comments, you need to log in
How to deploy a docker-compose application on a VPS?
Good afternoon.
I have 2 services described in docker-compose.yml:
version: '2'
services:
php:
build: php
ports:
- "80:80"
volumes:
- ./php/www:/var/www/site
links:
- db
db:
image: mysql:latest
volumes:
- /var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_USER=user
- MYSQL_PASSWORD=password
- MYSQL_DATABASE=database
docker-compose up -d
Answer the question
In order to leave comments, you need to log in
You need to add the remote machine to docker-machine and go to its context.
$ docker-machine create --driver generic \
--generic-ip-address $REMOTE_IP_OR_HOSTNAME \
$REMOTE_MACHINE_NAME
$ eval (docker-machine env $REMOTE_MACHINE_NAME)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question