Implement Dockerfile
This commit is contained in:
parent
1209b749ae
commit
fdb2fe3775
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
FROM ruby:3.1
|
||||
|
||||
# Move it
|
||||
WORKDIR /opt
|
||||
COPY public/ ./public/
|
||||
COPY views/ ./views/
|
||||
COPY Gemfile .
|
||||
COPY config.ru .
|
||||
COPY mywillpower.rb .
|
||||
|
||||
# Dependencies
|
||||
RUN apt-get update
|
||||
RUN apt-get -y upgrade
|
||||
RUN bundle install
|
||||
|
||||
# Environment
|
||||
EXPOSE 4567
|
||||
|
||||
# Send it
|
||||
CMD ["bundle", "exec", "rackup", "-o", "0.0.0.0", "-p", "4567", "-E", \
|
||||
"production"]
|
18
README.md
18
README.md
@ -2,6 +2,22 @@
|
||||
|
||||
Source code for http://mywillpower.org
|
||||
|
||||
## Install dependencies
|
||||
## Local
|
||||
|
||||
### Install dependencies
|
||||
|
||||
bundle install
|
||||
|
||||
### Run it locally
|
||||
|
||||
bundle exec mywillpower.rb
|
||||
|
||||
## Docker
|
||||
|
||||
### Build
|
||||
|
||||
docker build -t mywillpower .
|
||||
|
||||
### Run
|
||||
|
||||
docker run -p 4567:4567 mywillpower
|
||||
|
Loading…
x
Reference in New Issue
Block a user