Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: extended docker-compose.yml to addres Bug #1696 #1701

Merged
merged 7 commits into from
Mar 1, 2023

Conversation

maxheadroom
Copy link
Contributor

and provided some basic documentation for Docker self-hosting

and provided some basic documentation for Docker self-hosting
@stackblitz
Copy link

stackblitz bot commented Feb 10, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify
Copy link

netlify bot commented Feb 10, 2023

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit f65d0d1
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/63fcb4fc8dac33000709fe19
😎 Deploy Preview https://deploy-preview-1701--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Feb 10, 2023

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit f65d0d1
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/63fcb4fcfe47fa000807d344

@maxheadroom maxheadroom changed the title extended docker-compose.yml to addres Bug #1696 fix: extended docker-compose.yml to addres Bug #1696 Feb 10, 2023
@Shinigami92 Shinigami92 added the c: infra Changes to our infrastructure or project setup label Feb 25, 2023
@maxheadroom maxheadroom removed their assignment Feb 27, 2023
@patak-dev
Copy link
Member

@b2cc @kkoyung would you help us to review this PR? Thanks!

Copy link
Contributor

@kkoyung kkoyung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The note in docker-compose.yaml file can help people to properly setup their own self-hosting Elk using docker. I saw people ask as in #1696 a few times. This PR should help.

@patak-dev
Copy link
Member

Thanks @kkoyung!

@patak-dev patak-dev merged commit 4d88c79 into elk-zone:main Mar 1, 2023
@b2cc
Copy link

b2cc commented Mar 1, 2023

@patak-dev : Thanks for the updated to the docker-compose.yml , but is this supposed to fix the general problem that the login currently doesn't work with self-hosted instances?
I just built from latest main branch on Openshift and I still have the same error as described in #1696

fyi this is my current adapted buildconfig, let me know if I need to change anything.
Specifically I added ENV NUXT_PUBLIC_DEFAULT_SERVER=example.com to make the default server selection work:

  source:
    dockerfile: |
      FROM docker.io/library/node:lts-alpine AS base
      WORKDIR /elk
      FROM base AS builder
      ENV NUXT_PUBLIC_DEFAULT_SERVER=example.com
      RUN corepack enable
      RUN apk update
      RUN apk add git --no-cache
      COPY package.json ./
      COPY pnpm-lock.yaml ./
      COPY patches ./patches
      RUN pnpm i --frozen-lockfile --ignore-scripts
      COPY . ./
      RUN pnpm i --frozen-lockfile
      RUN pnpm build
      FROM base AS runner
      ENV NODE_ENV=production
      COPY --from=builder /elk/.output ./.output
      EXPOSE 5314/tcp
      ENV PORT=5314
      ENV NUXT_STORAGE_FS_BASE='/elk/data'
      ENV NUXT_PUBLIC_DEFAULT_SERVER=example.com
      VOLUME [ "/elk/data" ]
      CMD ["node", ".output/server/index.mjs"]
    git:
      ref: main
      uri: https://github.com/elk-zone/elk
    type: Git
  strategy:
    dockerStrategy: {}
    type: Docker

@kkoyung
Copy link
Contributor

kkoyung commented Mar 1, 2023

@b2cc This PR gives extra information for people to properly setup their self-hosting Elk directly on Docker Engine. I tested on my server.

I am not familiar with Openshift. I suspect it may work differently from the original Docker Engine.

Is any folder named v3 (or something similar) generated at /elk/data after trying to login? If not, the node process inside your container may be still not granted to write file to /elk/data. It yes, it could be caused by another problem.

@b2cc
Copy link

b2cc commented Mar 1, 2023

@kkoyung : just checked and the /elk/data folder is still empty, although I'm positive that the process can write into it. I'll follow up in the other ticket, maybe it is a different issue.

DataDrivenMD pushed a commit to Distal-Labs/elk that referenced this pull request Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: infra Changes to our infrastructure or project setup
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants