forked from standardnotes/app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (38 loc) · 1.3 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
###
# Build with 'docker build -t standard_notes_web.img .'
# Run with 'docker run -d -p 127.0.0.1:3000:3000 --name standard_notes_web --restart always standard_notes_web.img'
# If you need shell access, run 'docker exec -it standard_notes_web /bin/sh'
# Access from http://localhost:3000/
# Set up Nginx to terminate SSL with LetsEncrypt and proxy_pass to http://localhost:3000/
###
FROM ruby:alpine
RUN apk add --update --no-cache \
alpine-sdk \
nodejs \
nodejs-npm \
tzdata
WORKDIR /app/
COPY . /app/
###
# FOR PRODUCTION USE:
#
# If you need the app to continue listening on HTTP instead of HTTPS
# (like terminating SSL on upstream server, i.e. Nginx proxy_pass to HTTP),
# you will need to set 'config.force_ssl = false' in 'config/environments/production.rb'.
#
# Uncomment SECRET_KEY_BASE, RAILS_ENV, and [optionally] RAILS_SERVE_STATIC_FILES for production:
# ENV SECRET_KEY_BASE=[VALUE OF `bundle exec rake secret`]
#
# ENV RAILS_ENV=production
#
# ENV RAILS_SERVE_STATIC_FILES=true
# Leave RAILS_SERVE_STATIC_FILES commented if Nginx/Apache will serve static files instead of rails.
###
RUN bundle install
RUN npm install
RUN npm run build
# Uncomment the line below for production:
# RUN bundle exec rake assets:precompile
EXPOSE 3000
ENTRYPOINT [ "./docker/entrypoint" ]
CMD [ "start" ]