diff --git a/blog/config/config.rb b/blog/config/config.rb index c1a8577..674f00e 100755 --- a/blog/config/config.rb +++ b/blog/config/config.rb @@ -16,10 +16,10 @@ module BlogBackend end BlogBackend.configure do |config| - config.postgres.database = ENV.fetch("DATABASE_NAME") { "ewallet_backend" } - config.postgres.host = ENV.fetch("DATABASE_HOST") - config.postgres.password = ENV.fetch("DATABASE_PASSWORD") - config.postgres.username = ENV.fetch("DATABASE_USERNAME") + config.postgres.database = ENV.fetch("POSTGRES_NAME") { "ewallet_backend" } + config.postgres.host = ENV.fetch("POSTGRES_HOST") + config.postgres.password = ENV.fetch("POSTGRES_PASSWORD") + config.postgres.username = ENV.fetch("POSTGRES_USERNAME") config.redis.uri = ENV.fetch("REDIS_URI") end diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e2db041 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,45 @@ +version: "3.4" +services: + + app: + build: + context: https://github.com/ynd-consult-ug/docker-ruby.git#:generated/alpine/3.11/2.6.3/ + image: ymd-base-image + env_file: + - blog/.env + volumes: + - ./blog:/blog + working_dir: /blog + entrypoint: /blog/docker-entrypoint.sh + expose: + - "3000" + ports: + - "3000:3000" + networks: + - ymd_web + + db: + image: postgres + env_file: + - blog/.env + volumes: + - 'ymd-postgres:/var/lib/postgresql/data' + networks: + - ymd_web + + redis: + image: redis + restart: unless-stopped + env_file: + - blog/.env + volumes: + - ymd-redis:/data + networks: + - ymd_web + +volumes: + ymd-postgres: + ymd-redis: + +networks: + ymd_web: \ No newline at end of file