Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.git
.gitignore
README
doc/
log/*
tmp/*
*.log
.DS_Store
.envrc
.ruby-gemset
.ruby-version
db/*.sqlite3
db/schema.rb
public/assets/*
node_modules
*.swp
*.swo
*~

22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ruby:3.3

RUN apt-get update -qq && \
apt-get install -y \
build-essential \
sqlite3 \
libsqlite3-dev \
nodejs \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY Gemfile Gemfile.lock ./

RUN bundle install

COPY . .

EXPOSE 3000

CMD ["rails", "server", "-b", "0.0.0.0"]

12 changes: 12 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ Seattle.rb was the first Ruby (and Rails) user group in the world and has met re

4. Submit a pull request

== Docker ==

Start the app:
```bash
docker compose up
```

Get into bash:
```bash
docker compose exec web bash
```

== License ==

Don't care. Do whatever you want with it.
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
services:
web:
build: .
command: bash -c "rm -f tmp/pids/server.pid && rails server -b 0.0.0.0"
volumes:
- .:/app
- bundle_cache:/usr/local/bundle
ports:
- "3000:3000"
environment:
RAILS_ENV: development

volumes:
bundle_cache: