Skip to content

Commit

Permalink
fixing website (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
v3ntur4X authored Feb 18, 2025
1 parent f1b92dd commit feac11f
Show file tree
Hide file tree
Showing 5 changed files with 5,078 additions and 3,282 deletions.
53 changes: 46 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,64 @@
# Etapa 1: Construção do ambiente Ruby (Jekyll)
FROM jekyll/jekyll AS builder

WORKDIR /build
COPY Gemfile Gemfile.lock ./
RUN bundle install

# Configuração do Bundler e instalação das dependências
RUN bundle config set path './.bundle' && \
mkdir ./.bundle && \
chmod -R 777 /build/.bundle && \
bundle install

# Etapa 2: Instalação do Node.js e pacotes npm
FROM node:20 AS installer

WORKDIR /build
COPY package.json package-lock.json ./
RUN npm i

# Instalação da versão mais recente do npm e das dependências
RUN npm install -g npm@latest && \
npm install

# Etapa 3: Construção do Jekyll e execução do Webpack
FROM jekyll/jekyll AS builder2

WORKDIR /build

# Copiar arquivos do 'builder' que contém o Jekyll instalado
COPY --from=builder /build/.bundle ./ ./

# Copiar arquivos do 'installer' que contém as dependências do npm
COPY --from=installer /build/node_modules ./node_modules/

# Copiar o restante dos arquivos (o código-fonte, por exemplo)
COPY . .

# Definir variáveis de ambiente necessárias para o Webpack
# ENV NODE_OPTIONS=--openssl-legacy-provider

# Executando o Webpack
RUN npx webpack
RUN mkdir ./_site
RUN mkdir ./src/.jekyll-cache/
RUN chmod 777 ./src/.jekyll-cache/
RUN JEKYLL_ENV=production jekyll build --future --trace

# Criação de diretórios e permissões para o Jekyll
RUN mkdir ./_site && \
mkdir ./src/.jekyll-cache/ && \
chmod 777 ./src/.jekyll-cache/

# Construção do Jekyll para produção
RUN JEKYLL_ENV=production jekyll build --future --trace

# Etapa 4: Imagem final para execução com Nginx
FROM nginx:alpine AS runner

# Configuração do Nginx
COPY deploy/nginx.conf /etc/nginx/nginx.conf

WORKDIR /app
COPY --from=builder /build/_site ./

# Copiar os arquivos gerados pelo Jekyll e as assinaturas
COPY --from=builder2 /build/_site ./
COPY /assinaturas ./assinaturas

# Expor a porta 5000 para o Nginx
EXPOSE 5000
86 changes: 53 additions & 33 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
colorator (1.1.0)
concurrent-ruby (1.1.5)
concurrent-ruby (1.3.5)
cssminify2 (2.0.1)
em-websocket (0.5.1)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
http_parser.rb (~> 0)
eventmachine (1.2.7)
execjs (2.7.0)
execjs (2.10.0)
fastimage (1.8.1)
addressable (~> 2.3, >= 2.3.5)
ffi (1.11.1)
ffi (1.17.1)
ffi (1.17.1-aarch64-linux-gnu)
ffi (1.17.1-aarch64-linux-musl)
ffi (1.17.1-arm-linux-gnu)
ffi (1.17.1-arm-linux-musl)
ffi (1.17.1-arm64-darwin)
ffi (1.17.1-x86-linux-gnu)
ffi (1.17.1-x86-linux-musl)
ffi (1.17.1-x86_64-darwin)
ffi (1.17.1-x86_64-linux-gnu)
ffi (1.17.1-x86_64-linux-musl)
forwardable-extended (2.6.0)
hike (1.2.3)
htmlcompressor (0.4.0)
http_parser.rb (0.6.0)
i18n (1.6.0)
http_parser.rb (0.8.0)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
jekyll (4.0.0)
jekyll (4.0.1)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
Expand All @@ -43,55 +53,55 @@ GEM
sprockets (~> 2.10)
sprockets-helpers
sprockets-sass
jekyll-feed (0.12.1)
jekyll-feed (0.17.0)
jekyll (>= 3.7, < 5.0)
jekyll-minifier (0.1.10)
cssminify2 (~> 2.0)
htmlcompressor (~> 0.4)
jekyll (>= 3.5)
json-minify (~> 0.0.3)
uglifier (~> 4.1)
jekyll-sass-converter (2.0.0)
jekyll-sass-converter (2.2.0)
sassc (> 2.0.1, < 3.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
json (2.2.0)
json (2.10.1)
json-minify (0.0.3)
json (> 0)
kramdown (2.1.0)
kramdown (2.5.1)
rexml (>= 3.3.9)
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
liquid (4.0.4)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
mini_magick (4.9.5)
multi_json (1.13.1)
mini_magick (4.13.2)
multi_json (1.15.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.1)
public_suffix (6.0.1)
rack (1.6.13)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rouge (3.9.0)
ruby_dep (1.5.0)
rexml (3.4.1)
rouge (3.30.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.2.0)
sassc (2.4.0)
ffi (~> 1.9)
sprockets (2.12.5)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-helpers (1.2.1)
sprockets-helpers (1.4.0)
sprockets (>= 2.2)
sprockets-sass (1.3.1)
sprockets (~> 2.0)
Expand All @@ -100,17 +110,27 @@ GEM
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
tilt (1.4.1)
tzinfo (1.2.5)
tzinfo (1.2.11)
thread_safe (~> 0.1)
tzinfo-data (1.2019.2)
tzinfo-data (1.2025.1)
tzinfo (>= 1.0.0)
uglifier (4.1.20)
uglifier (4.2.1)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.6.0)
unicode-display_width (1.8.0)
wdm (0.1.1)

PLATFORMS
aarch64-linux-gnu
aarch64-linux-musl
arm-linux-gnu
arm-linux-musl
arm64-darwin
ruby
x86-linux-gnu
x86-linux-musl
x86_64-darwin
x86_64-linux-gnu
x86_64-linux-musl

DEPENDENCIES
jekyll (~> 4.0.0)
Expand All @@ -122,4 +142,4 @@ DEPENDENCIES
wdm (~> 0.1.1)

BUNDLED WITH
2.0.2
2.3.25
Loading

0 comments on commit feac11f

Please sign in to comment.