Skip to content

Add config files to run the project on Docker environment - #7

Open
akky wants to merge 3 commits into
kkuchta:masterfrom
akky:feature/dockerize
Open

Add config files to run the project on Docker environment#7
akky wants to merge 3 commits into
kkuchta:masterfrom
akky:feature/dockerize

Conversation

@akky

@akky akky commented May 8, 2019

Copy link
Copy Markdown

To run the project on my local, I wrote docker files and this may be useful for someone else.

How to run

  1. set up docker machine / client
  2. docker-compose up --build
  3. open browser(s) to access http://<your docker machine's IP address>:9292/

Docker machine's IP address can be seen on "docker-machine ls".

@james-powis

Copy link
Copy Markdown

I think it would only be wise to alias puma to cougar and execute that way... Just so we all better understand just how dangerous this might be.

@rmd1710714107

Copy link
Copy Markdown

What is docker machine/client?Take a example,please.

@kkuchta

kkuchta commented May 11, 2019

Copy link
Copy Markdown
Owner

Martin: Docker is a tool for running containers. Containers are like virtual machines, but lightweight.

DockerMachine is a way to run docker on a Mac or Windows computer (usually you have to run it on Linux).

An alternative is Docker for Mac, which is, as I understand it, newer.

@downloadpizza

Copy link
Copy Markdown

@james-powis Would you mind explaining what exactly is dangerous? I don't currently have a workstation with docker so I cant test

Comment thread Dockerfile Outdated
bundle update --bundler && \
bundle install
COPY . .
COPY for-docker.env .env

@hasnat hasnat May 11, 2019

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

you can have for-docker.env as .env in repo and remove this line
or better have environment passed in compose file and not have any .env file

environment:
  REDIS_URL: redis://redis:6379

I believe REDIS_HOST and REDIS_PORT are not in use

@rmd1710714107

Copy link
Copy Markdown

Martin: Docker is a tool for running containers. Containers are like virtual machines, but lightweight.

DockerMachine is a way to run docker on a Mac or Windows computer (usually you have to run it on Linux).

An alternative is Docker for Mac, which is, as I understand it, newer.

In a word it is a virtual machine that runs some programs.

@downloadpizza

Copy link
Copy Markdown

@Martin730913 Yes, but actually no. It uses the Linux Kernel of your OS (If you use Linux, it is basically a VM in Windows, at least until WSL2 comes out). That means it uses a lot less resources, allowing you to run a lot of containers

@rmd1710714107

Copy link
Copy Markdown

@Martin730913 Yes, but actually no. It uses the Linux Kernel of your OS (If you use Linux, it is basically a VM in Windows, at least until WSL2 comes out). That means it uses a lot less resources, allowing you to run a lot of containers

Ok,I see. Thanks for your patient reply.

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.

7 participants