From bfbcd4aaf88f056ce5c60b3fda60e6e712a144f2 Mon Sep 17 00:00:00 2001 From: leenday Date: Thu, 10 Sep 2020 21:46:05 +0300 Subject: [PATCH] added docker-compose.yml to the app --- docker-compose.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..14dd20c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,34 @@ +version: '3.7' + +services: + web: + build: . + volumes: &web-volumes + - &app-volume .:/app:cached + - ~/.ssh:/root/.ssh + - ~/.bash_history:/root/.bash_history + - &bundle-cache-volume bundle_cache:/bundle_cache + ports: + - 3000:3000 + - 3001:3001 + - 3002:3002 + depends_on: + - db + environment: &web-environment + BUNDLE_PATH: /bundle_cache + GEM_HOME: /bundle_cache + GEM_PATH: /bundle_cache + RAILS_PORT: 3000 + RUBYOPT: -W:no-deprecated -W:no-experimental + command: bundle exec rails s -b '0.0.0.0' -p 3000 + + db: + image: postgres:11.4 + ports: + - 5432:5432 + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + +volumes: + bundle_cache: