-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·35 lines (25 loc) · 1021 Bytes
/
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
FROM ruby:3.3.1
# Instalar dependencias del sistema
RUN apt-get update -qq && apt-get install -y nodejs postgresql-client build-essential libnss3
# Instalar Yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update && apt-get install -y yarn
WORKDIR /lemontech_events
# Copiar archivos de gemas y ejecutar bundle install
COPY Gemfile /lemontech_events/Gemfile
COPY Gemfile.lock /lemontech_events/Gemfile.lock
RUN bundle install
# Copiar package.json y ejecutar yarn install para generar yarn.lock
COPY package.json /lemontech_events/package.json
RUN yarn install
# Copiar el archivo .env
COPY .env /lemontech_events/.env
# Copiar el resto del código de la aplicación
COPY . /lemontech_events
# Precompilar assets
RUN bundle exec rake assets:precompile
# Exponer el puerto 3000
EXPOSE 3000
# Comando para iniciar el servidor
CMD ["rails", "server", "-b", "0.0.0.0"]