diff --git a/.dockerfile b/.dockerfile deleted file mode 100644 index e69de29..0000000 diff --git a/.dockerignore b/.dockerignore index e69de29..d218ad4 100644 --- a/.dockerignore +++ b/.dockerignore @@ -0,0 +1,14 @@ +node_modules +dist +.astro +.env +.env.example +.git +.gitignore +dockerfile +.dockerignore +.vscode +.prettierrc +codegen.ts +schema.graphql +README.md \ No newline at end of file diff --git a/.env.example b/.env.example index a3aa8f6..9cf0e4d 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,4 @@ +ASTRO_TELEMETRY_DISABLED=1 DIRECTUS_URL= DIRECTUS_URL_GRAPHQL= DIRECTUS_TOKEN= \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d2f5bbf --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +ARG NODE_IMAGE=node:24.0.0-alpine + +FROM ${NODE_IMAGE} AS build + +WORKDIR /app +COPY package*.json . +RUN npm ci +COPY . . +RUN npm run build + +FROM ${NODE_IMAGE} AS production +WORKDIR /app + +COPY --from=build /app/dist ./dist +COPY --from=build /app/package*.json . +RUN npm ci --omit=dev + +EXPOSE 9966 +CMD [ "node", "./dist/server/entry.mjs"] \ No newline at end of file diff --git a/compose.yml b/compose.yml index e69de29..85e0943 100644 --- a/compose.yml +++ b/compose.yml @@ -0,0 +1,17 @@ +services: + yarkov-tech-node: + container_name: yarkov-tech-node + restart: unless-stopped + image: sergeyyarkov/yarkovtech:latest + networks: + - nginx_net + env_file: .env + build: + context: ./ + dockerfile: Dockerfile + ports: + - 9966 + +networks: + nginx_net: + external: true \ No newline at end of file diff --git a/nginx/website.conf b/nginx/website.conf deleted file mode 100644 index e69de29..0000000 diff --git a/src/components/AvailableOnLangs.astro b/src/components/AvailableOnLangs.astro index c88666c..954a0cf 100644 --- a/src/components/AvailableOnLangs.astro +++ b/src/components/AvailableOnLangs.astro @@ -22,14 +22,15 @@ const { articles } = Astro.props; (a) => a && ( {`${a.languages_code?.name}`} + href={`${createRelativeArticleUrl({ slug: a.slug, articleLang: `${a.languages_code?.code.split("-")[0]}`, pubDate: a.pub_date })}`} + >{`${a.languages_code?.name}`} ) )} ) } -