Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerize application #15

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

gruz0
Copy link
Contributor

@gruz0 gruz0 commented Apr 29, 2019

Hey! I dockerized app to use it in development environment 🕺

.env.development.sample Outdated Show resolved Hide resolved
.gitignore Outdated
@@ -1,3 +1,7 @@
/public/assets*
/tmp
/coverage

.env.development
!.env.test
Copy link
Contributor

@we138 we138 Apr 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it typo? do you mean .env.test without !?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx! It is a typo, yeah :-D

Dockerfile.development Outdated Show resolved Hide resolved
@gruz0 gruz0 force-pushed the feature/dockerize-app branch from a1a517f to 08b27df Compare April 30, 2019 07:34
@gruz0
Copy link
Contributor Author

gruz0 commented Apr 30, 2019

[11:35] my-projects/rubyjobs.dev ‹feature/dockerize-app›$ docker images | grep ruby
rubyjobsdev_web     latest              fabd83981577        3 minutes ago       363MB

Copy link
Owner

@davydovanton davydovanton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good for me, let's make it optional and after that merge 👍

MODERATION_SESSIONS_SECRET="f62e64af694897dd5a3b949891f2715ada568401017905098809aa80e8943dd0"
REDISTOGO_URL="redis://localhost:6379"
HANAMI_ENV=development
DATABASE_URL=postgres://safelylaunch@postgres/core
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong DB name?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DATABASE_URL=postgres://safelylaunch@postgres/core
# For docker development
# DATABASE_URL=postgres://rubyjobs@postgres/core
# for local development
# DATABASE_URL="postgresql://localhost/ruby_jobs_development"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

SERVE_STATIC_ASSETS=true
WEB_SESSIONS_SECRET=238d8ece1579f59647fe3d7c5ca2c78f02142a6392506a929d14c46424e52543
MODERATION_SESSIONS_SECRET=f62e64af694897dd5a3b949891f2715ada568401017905098809aa80e8943dd0
REDISTOGO_URL=redis://redis:6379
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
REDISTOGO_URL=redis://redis:6379
# For docker development
# REDISTOGO_URL=redis://redis:6379
 
# For local development
# REDISTOGO_URL="redis://localhost:6379"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

README.md Outdated
@@ -3,32 +3,27 @@

Welcome to your new Hanami project!

## Setup
## How to run app inside Docker
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you move this information to CONTRIBUTING.md file without changing readme?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

postgres:
image: postgres:9.6.2-alpine
environment:
POSTGRES_USER: safelylaunch
POSTGRES_DB: core
ports:
- 5432:5432

web:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, we need to add sidekiq too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@VMashanov
Copy link

So, will be applied this PR into master?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants