The following parameters have been added to deploy-secrets.yml: * **use_rvm**: yes/no * **ruby_version**: Ruby version for rvm. Defaults to 2.3.2 * **repository**: Git repository. Defaults to the oficial repository * **branch**: Branch to deploy. Defaults to master * **rails_env**: Defaults to the stage. Fixed migrations that required admin rights. Now first check if the postgress extensions are available. If so finish without doing nothin. Added support for passenger.
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
version: '3'
|
|
services:
|
|
# service configuration for our database
|
|
database:
|
|
|
|
# use the preferred version of the official Postgres image
|
|
# see https://hub.docker.com/_/postgres/
|
|
image: postgres:9.4.5
|
|
|
|
# persist the database between containers by storing it in a volume
|
|
volumes:
|
|
- docker-example-postgres:/var/lib/postgresql/data
|
|
|
|
# service configuration for our dockerized Rails app
|
|
app:
|
|
|
|
# use the Dockerfile next to this file
|
|
build: .
|
|
entrypoint: /usr/local/bin/entrypoint.sh
|
|
command: bundle exec rails s -p 3000 -b '0.0.0.0'
|
|
working_dir: /var/www/consul
|
|
|
|
# rely on the RAILS_ENV value of the host machine
|
|
# environment:
|
|
#RAILS_ENV: $RAILS_ENV
|
|
|
|
# makes the app container aware of the DB container
|
|
depends_on:
|
|
- database
|
|
|
|
# expose the port we configured Unicorn to bind to
|
|
ports:
|
|
- "3000:3000"
|
|
# map our application source code, in full, to the application root of our container
|
|
volumes:
|
|
- .:/var/www/consul:delegated
|
|
- bundle:/usr/local/bundle:delegated
|
|
- "$SSH_AUTH_SOCK:/tmp/agent.sock"
|
|
environment:
|
|
- SSH_AUTH_SOCK=/tmp/agent.sock
|
|
volumes:
|
|
docker-example-postgres: {}
|
|
bundle: {}
|