Skip to content

Commit

Permalink
Change to foreman to run app, so we can run workers too
Browse files Browse the repository at this point in the history
  • Loading branch information
Floppy committed Mar 11, 2021
1 parent 1b34178 commit 2dc2d57
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM ruby:3.0-alpine AS build

RUN apk add --no-cache tzdata alpine-sdk postgresql-dev nodejs yarn python2
RUN gem install foreman

ENV PORT 3214
ENV RACK_ENV production
Expand Down Expand Up @@ -28,4 +29,4 @@ RUN \

EXPOSE 3214
ENTRYPOINT ["bin/docker-entrypoint.sh"]
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]
CMD ["foreman", "start"]
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rails: bundle exec rails server -p $PORT
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,18 @@ You can run all the dependencies in one go using `docker-compose`:
* Bundler 2.x
* Node.js 14.x
* Yarn >= 1.22
* Foreman or [another Procfile runner](https://github.com/ddollar/foreman#ports)

### Usage

```
bundle install
yarn install
bundle exec rake db:migrate
bundle exec rails server
foreman start
```

The server will then be running at http://127.0.0.1:3000
The server will then be running at http://127.0.0.1:5000
### How to run the test suite

`bundle exec rake`
Expand Down

0 comments on commit 2dc2d57

Please sign in to comment.