Skip to content

Commit

Permalink
fix: CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhJae committed Sep 3, 2024
1 parent 5f530fd commit c1bd0bf
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 114 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG NODE_VERSION=22.5.1

FROM node:${NODE_VERSION}-slim as base
FROM node:${NODE_VERSION}-slim AS base

ARG PORT=3000

Expand All @@ -9,15 +9,15 @@ ENV NODE_ENV=production
WORKDIR /src

# Build
FROM base as build
FROM base AS build

COPY --link package.json package-lock.json ./
RUN npm install --production
RUN npm install --omit=dev

COPY --link . .

RUN npm run build
RUN npm prune
RUN npm prune --production

# Run
FROM base
Expand Down
222 changes: 112 additions & 110 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,121 +1,123 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
ssr: true,
css: ["@/assets/globals.css"],
devtools: {enabled: false},
extends: ["@nuxt/ui-pro"],
modules: ["@nuxtjs/i18n", "@nuxt/ui", "@nuxtjs/i18n", "@nuxt/content", "@nuxtjs/seo"],
ssr: true,
css: ["@/assets/globals.css"],
devtools: { enabled: false },
extends: ["@nuxt/ui-pro"],
modules: [
"@nuxtjs/i18n",
"@nuxt/ui",
"@nuxtjs/i18n",
"@nuxt/content",
"@nuxtjs/seo",
],

ui: {
icons: ["simple-icons", "heroicons", "ph"],
icon: {
provider: "server",
clientBundle: {
icons: [
"ph:moon",
"ph:sun",
"ph:caret-down",
"ph:check",
"ph:list",
"ph:x",
"ph:arrow-right",
"ph:check-square",
"ph:code-block",
"ph:money",
"ph:person-simple-circle",
"ph:shield-check",
"ph:user-check",
"ph:lightbulb",
"ph:wrench",
],
},

icon: {
provider: "server",
clientBundle: {
icons: [
"ph:moon",
"ph:sun",
"ph:caret-down",
"ph:check",
"ph:list",
"ph:x",
"ph:arrow-right",
"ph:check-square",
"ph:code-block",
"ph:money",
"ph:person-simple-circle",
"ph:shield-check",
"ph:user-check",
"ph:lightbulb",
"ph:wrench",
],
},
serverBundle: {
collections: ["ph"],
},
serverBundle: {
collections: ["ph"],
},
},

hooks: {
"prerender:routes"({routes}) {
routes.clear(); // Do not generate any routes (except the defaults)
},
hooks: {
"prerender:routes"({ routes }) {
routes.clear(); // Do not generate any routes (except the defaults)
},
},

i18n: {
baseUrl: "https://bluescript.app",
langDir: "locales",
lazy: true,
strategy: "no_prefix",
defaultLocale: "en",

detectBrowserLanguage: {
useCookie: true,
cookieKey: "i18n_redirected",
redirectOn: "root", // recommended
},
i18n: {
baseUrl: "https://bluescript.app",
langDir: "locales",
lazy: true,
strategy: "no_prefix",
defaultLocale: "en",

locales: [
{
code: "ko",
language: "ko-KR",
name: "한국어",
file: "ko/main.json",
},
{
code: "en",
language: "en-US",
name: "English",
file: "en/main.json",
},
{
code: "fr",
language: "fr-FR",
name: "Français",
file: "fr/main.json",
},
{
code: "es",
language: "es-ES",
name: "Español",
file: "es/main.json",
},
{
code: "ru",
language: "ru-RU",
name: "Русский",
file: "ru/main.json",
},
{
code: "ja",
language: "ja-JP",
name: "日本語",
file: "ja/main.json",
},
{
code: "zh",
language: "zh-CN",
name: "中文",
file: "zh/main.json",
},
{
code: "ar",
language: "ar-SA",
name: "العربية",
file: "ar/main.json",
},
{
code: "hi",
language: "hi-IN",
name: "हिन्दी",
file: "hi/main.json",
},
],
detectBrowserLanguage: {
useCookie: true,
cookieKey: "i18n_redirected",
redirectOn: "root", // recommended
},

routeRules: {
'/api/search.json': {prerender: true},
'/docs': {redirect: '/docs/getting-started'}
},
compatibilityDate: "2024-07-25",
});
locales: [
{
code: "ko",
language: "ko-KR",
name: "한국어",
file: "ko/main.json",
},
{
code: "en",
language: "en-US",
name: "English",
file: "en/main.json",
},
{
code: "fr",
language: "fr-FR",
name: "Français",
file: "fr/main.json",
},
{
code: "es",
language: "es-ES",
name: "Español",
file: "es/main.json",
},
{
code: "ru",
language: "ru-RU",
name: "Русский",
file: "ru/main.json",
},
{
code: "ja",
language: "ja-JP",
name: "日本語",
file: "ja/main.json",
},
{
code: "zh",
language: "zh-CN",
name: "中文",
file: "zh/main.json",
},
{
code: "ar",
language: "ar-SA",
name: "العربية",
file: "ar/main.json",
},
{
code: "hi",
language: "hi-IN",
name: "हिन्दी",
file: "hi/main.json",
},
],
},

routeRules: {
"/api/search.json": { prerender: true },
"/docs": { redirect: "/docs/getting-started" },
},
compatibilityDate: "2024-07-25",
});

0 comments on commit c1bd0bf

Please sign in to comment.