Initial commit - Fase 1: Setup Rails + Docker
This commit is contained in:
29
Dockerfile
Normal file
29
Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
FROM ruby:3.2.2-slim
|
||||
|
||||
# Dependências do sistema
|
||||
RUN apt-get update -qq && apt-get install -y \
|
||||
build-essential \
|
||||
libpq-dev \
|
||||
nodejs \
|
||||
npm \
|
||||
curl \
|
||||
git \
|
||||
libvips \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Diretório da app
|
||||
WORKDIR /app
|
||||
|
||||
# Instala gems
|
||||
COPY Gemfile Gemfile.lock* ./
|
||||
RUN bundle install --jobs 4 --retry 3
|
||||
|
||||
# Copia o restante do código
|
||||
COPY . .
|
||||
|
||||
# Pré-compila assets (em produção)
|
||||
# RUN bundle exec rails assets:precompile
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]
|
||||
Reference in New Issue
Block a user