Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dtcristo committed Apr 18, 2023
1 parent 63708cc commit 174b511
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 66 deletions.
43 changes: 4 additions & 39 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,39 +1,4 @@
# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files.

# Ignore git directory.
/.git/

# Ignore bundler config.
/.bundle

# Ignore all default key files.
/config/master.key
/config/credentials/*.key

# Ignore all environment files.
/.env*
!/.env.example

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep

# Ignore storage (uploaded files in development and any SQLite databases).
/storage/*
!/storage/.keep
/tmp/storage/*
!/tmp/storage/
!/tmp/storage/.keep

# Ignore assets.
/node_modules/
/app/assets/builds/*
!/app/assets/builds/.keep
/public/assets
*
!/public/
!/config.ru
!/Gemfile*
15 changes: 0 additions & 15 deletions .gitignore

This file was deleted.

20 changes: 8 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
# syntax = docker/dockerfile:1

FROM ruby:3.2-alpine

FROM ruby:3.2-alpine as base
WORKDIR /app

RUN apk add build-base
FROM base as build
COPY Gemfile Gemfile.lock .
RUN set -eux; \
apk add --no-cache build-base; \
bundle install;

# Install application gems
COPY Gemfile Gemfile.lock ./
RUN bundle install

# Copy application code
FROM base as app
COPY --from=build /usr/local/bundle /usr/local/bundle
COPY . .

# Start the server by default, this can be overwritten at runtime
EXPOSE 9292
CMD ["puma"]

0 comments on commit 174b511

Please sign in to comment.