Do not forget to execute the main command in container with exec
!!!
Double check that puma, sidekiq or something else is running in container with PID 1!!!
docker-compose up
if there is no images and command fails:
docker-compose build
and then docker-compose up
By default docker reads docker-compose.yml
and docker-compose.override.yml
docker-compose.override.yml
contains overrides for development.
docker-compose.staging.yml
- for staging.
docker-compose.production.yml
- for production.
docker-compose exec backend rails c
docker-compose stop backend && docker-compose run --service-ports backend
docker-machine create --driver generic \
--generic-ip-address REMOTE_HOST_IP \
--generic-ssh-user REMOTE_HOST_USER \
--generic-ssh-key KEY_PATH \
--engine-storage-driver devicemapper \
MACHINE_NAME
eval $(docker-machine env MACHINE_NAME)
-
production:
docker-compose \ --project-name PROJECT \ -f docker-compose.yml \ -f docker-compose.production.yml \ build --no-cache
-
staging:
docker-compose \ --project-name PROJECT \ -f docker-compose.yml \ -f docker-compose.staging.yml \ build --no-cache
-
production:
docker-compose \ --project-name PROJECT \ -f docker-compose.yml \ -f docker-compose.production.yml \ up -d
-
staging:
docker-compose \ --project-name PROJECT \ -f docker-compose.yml \ -f docker-compose.staging.yml \ up -d
docker-compose \
--project-name PROJECT \
-f docker-compose.yml \
-f docker-compose.production.yml \
build --no-cache \
frontend
docker-compose \
--project-name PROJECT \
-f docker-compose.yml \
-f docker-compose.production.yml \
up \
frontend
docker-compose \
--project-name PROJECT \
-f docker-compose.yml \
-f docker-compose.production.yml \
exec \
frontend /bin/bash
docker-compose \
--project-name PROJECT \
-f docker-compose.yml \
-f docker-compose.production.yml \
logs -f