Giter Club home page Giter Club logo

hoppscotch-docker's Introduction

hoppscotch-docker's People

Contributors

webysther avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hoppscotch-docker's Issues

`POSTGRES_PASSWORD` env variable is needed for setup

Thanks for your great work of this repo, I've seen your PRs in hoppscotch repo, and I feel sorry that the great PRs are not merged.

For easy usage of this Image, I think POSTGRES_PASSWORD env is also needed for individual values to accept Postgres Database Password.

Build error

Describe the bug
Build error

dotenv

# configuration without sensitive data

docker compose

# full file

logs

# docker-compose logs --no-color >& logs.txt

To Reproduce

# command executed or platform used (portainer/rancher)

Screenshots
图片

图片

Additional context
Add any other context about the problem here.

Originally posted by @MiV1N in #3 (comment)

Error 404

Hello!

I was testing your container on Kuberenets and encountered the following error:

{
   "duration": 0.000152593,
   "level": "error",
   "logger": "http.log.access.log0",
   "msg": "handled request",
   "request": {
      "headers": {
         "Accept": [
            "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"
         ],
         "Accept-Encoding": [
            "gzip, deflate, br"
         ],
         "Accept-Language": [
            "en-US,en;q=0.9"
         ],
         "Cache-Control": [
            "no-cache"
         ],
         "Pragma": [
            "no-cache"
         ],
         "Sec-Ch-Ua": [
            "\"Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"115\", \"Chromium\";v=\"115\""
         ],
         "Sec-Ch-Ua-Mobile": [
            "?0"
         ],
         "Sec-Ch-Ua-Platform": [
            "\"Windows\""
         ],
         "Sec-Fetch-Dest": [
            "document"
         ],
         "Sec-Fetch-Mode": [
            "navigate"
         ],
         "Sec-Fetch-Site": [
            "none"
         ],
         "Sec-Fetch-User": [
            "?1"
         ],
         "Upgrade-Insecure-Requests": [
            "1"
         ],
         "User-Agent": [
            "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"
         ],
         "X-Forwarded-For": [
            "10.2.1.1"
         ],
         "X-Forwarded-Host": [
            "hoppscotch.example.com"
         ],
         "X-Forwarded-Port": [
            "443"
         ],
         "X-Forwarded-Proto": [
            "https"
         ],
         "X-Forwarded-Scheme": [
            "https"
         ],
         "X-Real-Ip": [
            "10.2.1.1"
         ],
         "X-Request-Id": [
            "656595119e7e69ecd2261829b3add29e"
         ],
         "X-Scheme": [
            "https"
         ]
      },
      "host": "hoppscotch.example.com",
      "method": "GET",
      "proto": "HTTP/1.1",
      "remote_ip": "10.2.3.204",
      "remote_port": "56808",
      "uri": "/"
   },
   "resp_headers": {
      "Server": [
         "Caddy"
      ]
   },
   "size": 0,
   "status": 404,
   "ts": 1692188348.7542448,
   "user_id": ""
}

My env variables are the following:

MODE: team
ENABLE_ADMIN: true
DOMAIN: hoppscotch.example.com
SCHEMA: https
EXTENSIONS_ENABLED: true
SMTP_PROTOCOL: smtps
SMTP_DOMAIN: example.com
SMTP_PORT: 587
SMTP_USER: [email protected]
SMTP_PASSWORD: *********
POSTGRES_HOST: db.x
POSTGRES_PORT: 5432
POSTGRES_USER: postgres
POSTGRES_PASSWORD: xxxx
DATABASE_URL: postgresql://postgres:[email protected]:5432/hoppscotch
JWT_SECRET: xxxxx
SESSION_SECRET: xxxxxxx
WHITELISTED_ORIGINS: *
GOOGLE_CLIENT_ID: xxxxx.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET: xxxxx
MAILER_ADDRESS_FROM: '"xxxx" <[email protected]>'
MAILER_SMTP_URL: smtps://[email protected]:[email protected]

My ingress have the following config:

---

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: hoppscotch
  namespace: x
  annotations:
    kubernetes.io/ingress.class: nginx
    cert-manager.io/cluster-issuer: letsencrypt-staging
    nginx.ingress.kubernetes.io/large_client_header_buffers: "200m"
    nginx.ingress.kubernetes.io/proxy-body-size: "200m"
    nginx.ingress.kubernetes.io/enable-cors: "true"
    # disable httponly cookie
    nginx.ingress.kubernetes.io/http-only-cookies: "false"
    nginx.ingress.kubernetes.io/http-secure: "false"
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
  labels:
    app: hopps-app
    traffic-type: external
    cert-manager.io/cluster-issuer: letsencrypt-staging
    kubernetes.io/ingress.class: nginx
spec:
  tls:
  - hosts:
    - hoppscotch.example.com
    secretName: hoppscotch-tls
  rules:
  - host: hoppscotch.example.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: hopps-app
            port: 
              number: 80

---

apiVersion: apps/v1
kind: Deployment
metadata:
  name: hopps-app
  namespace: x
  labels:
    app: hopps-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: hopps-app
  template:
    metadata:
      labels:
        app: hopps-app
    spec:
      containers:
        - name: hopps-app
          image: webysther/hoppscotch:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 80
              hostPort: 80
              protocol: TCP
          envFrom:
            - configMapRef:
                name: hopps-configmap
          resources:
            requests:
              memory: "128Mi"
              cpu: "100m"
            limits:
              memory: "256Mi"
              cpu: "500m"

---

# Admin Service
apiVersion: v1
kind: Service
metadata:
  labels: 
    app: hopps-app
  name: hopps-app
  namespace: x
spec:
  ports:
    - name: app
      port: 80
      protocol: TCP
      targetPort: 80
  selector:
    app: hopps-app
  type: ClusterIP

Do you have any idea of what might be the cause to this issue?

Thank you in advance!

[Bug] Login return 401

I have tried to setup the hoppscotch using the latest docker image, everything is working fine but the login part.
I added microsoft and github credentiols and both return 401 in the call back,
I have also defined the
schema=http,
ENABLE_API=true
MICROSOFT_CLIENT_ID=****
MICROSOFT_CLIENT_SECRET=*****
MICROSOFT_CALLBACK_URL=https://URL:3170/v1/auth/microsoft/callback
Mode=team

[BUG] Can't reach database server at `hoppscotch-db'

Describe the bug

  • I get provided errormessage in the log
  • /admin returns 404.
  • Interface seems to be working .

dotenv

# configuration without sensitive data

docker compose

# full file
---
version: "2.1"
services:
  hoppscotch:
    image: webysther/hoppscotch:latest
    container_name: hoppscotch
    networks:
      hoppscotch:
      hoppscotch-db:
    environment:
      - ENABLE_ADMIN=true
      - MODE=team
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - POSTGRES_PASSWORD=password-for-database
    volumes:
      - /path/to/hoppscotch/config:/config
    ports:
      - 80:80
    depends_on:
      hoppscotch-db:
        condition: service_healthy
    restart: unless-stopped

  hoppscotch-db:
    image: postgres:alpine
    container_name: hoppscotch-db
    networks:
      hoppscotch-db:
    environment:
      - POSTGRES_DB=hoppscotch
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=password-for-database
    volumes:
      - /path/to/postgres/data:/var/lib/postgresql/data
    expose:
      - 5432
    healthcheck:
      test: [
        "CMD-SHELL", 
        "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'"
      ]
      interval: 10s
      timeout: 5s
      retries: 5
    restart: unless-stopped

networks:
  hoppscotch:
    name: hoppscotch
  hoppscotch-db:
    name: hoppscotch-db

logs

# postgres:alpinecontainer log
2024-03-07 14:03:01 2024-03-07 13:03:01.123 UTC [1] LOG:  starting PostgreSQL 16.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014, 64-bit
2024-03-07 14:03:01 2024-03-07 13:03:01.123 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-03-07 14:03:01 2024-03-07 13:03:01.123 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2024-03-07 14:03:01 2024-03-07 13:03:01.126 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-03-07 14:03:01 2024-03-07 13:03:01.127 UTC [24] LOG:  database system was shut down at 2024-03-07 13:02:31 UTC
2024-03-07 14:03:01 2024-03-07 13:03:01.131 UTC [1] LOG:  database system is ready to accept connections
2024-03-07 14:03:11 2024-03-07 13:03:11.178 UTC [34] FATAL:  role "-d" does not exist
2024-03-07 14:03:21 2024-03-07 13:03:21.247 UTC [42] FATAL:  role "-d" does not exist
2024-03-07 14:03:31 2024-03-07 13:03:31.319 UTC [49] FATAL:  role "-d" does not exist
2024-03-07 14:03:41 2024-03-07 13:03:41.399 UTC [57] FATAL:  role "-d" does not exist
2024-03-07 14:03:51 2024-03-07 13:03:51.468 UTC [64] FATAL:  role "-d" does not exist

logs

# hoppscotch container log
Node.js v18.16.0
2024-03-07 14:12:24 Thu, 07 Mar 2024 13:12:24 GMT express-session deprecated undefined resave option; provide resave option at dist/main.js:14:13
2024-03-07 14:12:24 Thu, 07 Mar 2024 13:12:24 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at dist/main.js:14:13
2024-03-07 14:12:27 /app/node_modules/.pnpm/@[email protected][email protected]/node_modules/@prisma/client/runtime/index.js:27839
2024-03-07 14:12:27           throw new PrismaClientInitializationError(error2.message, this.config.clientVersion, error2.error_code);
2024-03-07 14:12:27                 ^
2024-03-07 14:12:27 
2024-03-07 14:12:27 PrismaClientInitializationError: Can't reach database server at `hoppscotch-db`:`5432`
2024-03-07 14:12:27 
2024-03-07 14:12:27 Please make sure your database server is running at `hoppscotch-db`:`5432`.
2024-03-07 14:12:27     at startFn (/app/node_modules/.pnpm/@[email protected][email protected]/node_modules/@prisma/client/runtime/index.js:27839:17)
2024-03-07 14:12:27     at async Proxy.onModuleInit (/app/packages/hoppscotch-backend/dist/prisma/prisma.service.js:20:9)
2024-03-07 14:12:27     at async Promise.all (index 0)
2024-03-07 14:12:27     at async callModuleInitHook (/app/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@nestjs/core/hooks/on-module-init.hook.js:43:5)
2024-03-07 14:12:27     at async NestApplication.callInitHook (/app/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@nestjs/core/nest-application-context.js:210:13)
2024-03-07 14:12:27     at async NestApplication.init (/app/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@nestjs/core/nest-application.js:97:9)
2024-03-07 14:12:27     at async NestApplication.listen (/app/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@nestjs/core/nest-application.js:155:33)
2024-03-07 14:12:27     at async bootstrap (/app/packages/hoppscotch-backend/dist/main.js:38:5) {
2024-03-07 14:12:27   clientVersion: '4.8.1',
2024-03-07 14:12:27   errorCode: 'P1001'

To Reproduce

# command executed or platform used (portainer/rancher)
docker compose up -d

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Port for api and app individual

Is there any way to decide on which port to start the api? I have the problem is that I point to port 80 in my reverse proxy but it shows me the api and not the frontend.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.