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

Docker needed #26

Open
bondif opened this issue Dec 13, 2019 · 2 comments · May be fixed by #35
Open

Docker needed #26

bondif opened this issue Dec 13, 2019 · 2 comments · May be fixed by #35

Comments

@bondif
Copy link

bondif commented Dec 13, 2019

Please dockerize your application for ease of use.

@jeffque
Copy link

jeffque commented Dec 2, 2021

I have done it.

Dockerfile:

FROM ruby:2.7-alpine
WORKDIR /myapp
COPY Gemfile /myapp/Gemfile
COPY Gemfile.lock /myapp/Gemfile.lock
COPY config.ru /myapp/config.ru
COPY server.rb /myapp/server.rb
COPY style.css /myapp/style.css

RUN apk add make
RUN apk add gcc
RUN apk add musl-dev
RUN bundle install
EXPOSE 9292
CMD bundle exec puma

And because it needed also redis and I have no idea how it works nor how to setup it, docket-compose.yml:

version: "3.9"
services:
  css-chat:
    build: .
    ports:
      - "9292:9292"
    links:
      - redis
    environment:
      REDIS_URL: redis://redis
  redis:
    image: redis:6-alpine

It worked for me. I am no docker expert but, hey, the docker in my hyper-v got this and I could open my app in my Windows browser

@jeffque jeffque linked a pull request Dec 2, 2021 that will close this issue
@bondif
Copy link
Author

bondif commented Dec 2, 2021

It works perferctly, thank you!

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 a pull request may close this issue.

2 participants