Skip to content

Commit

Permalink
Move Dockerfile to .dockerignore, consolidate apk add
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Mar 21, 2023
1 parent 033edc8 commit ab413be
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ yarn-error.log
app/assets/builds/*
!app/assets/builds/.keep
fly.toml
Dockerfile
15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
from ruby:3.2.1-alpine

RUN apk add postgresql-dev postgresql-client
RUN apk add nodejs npm
RUN apk add tzdata
RUN apk add \
# g++ is required for sassc
g++ \
postgresql-dev \
postgresql-client \
nodejs \
npm \
tzdata

# for nokogiri
RUN apk add --virtual .ruby-gemdeps libc-dev gcc libxml2-dev libxslt-dev make libffi-dev
# for sassc
RUN apk add g++

RUN npm install -g yarn

Expand All @@ -34,8 +37,6 @@ RUN if [ "$RAILS_ENV" = "production" ]; then \
&& chmod 600 /swapfile; \
fi

RUN rm Dockerfile

EXPOSE ${PORT:-3000}
CMD if [ -f /swapfile ]; then swapon /swapfile; fi; \
bundle exec falcon serve -n "${FALCON_INSTANCES:-1}" -b "http://0.0.0.0:${PORT:-3000}"

0 comments on commit ab413be

Please sign in to comment.