Prepared solution for intern

This commit is contained in:
Michał Kacprzak 2020-10-08 05:52:40 +02:00
parent 2737c17732
commit a0e153d982
2 changed files with 49 additions and 4 deletions

View File

@ -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

45
docker-compose.yml Normal file
View File

@ -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: