Coder Social home page Coder Social logo

webysther / hoppscotch-docker Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 3.0 143 KB

All-in-one hoppscotch image that works with one domain and have embed smtp

Home Page: https://hub.docker.com/r/webysther/hoppscotch

License: MIT License

Dockerfile 12.72% Shell 87.28%

hoppscotch-docker's Introduction

Quick reference

Supported tags and respective Dockerfile links

Simple Tags

hoppscotch

Hoppscotch image is based on PRs: #3107 #3112.

Based on LSIO Images featuring:

  • easy user mappings (PGID, PUID)
  • custom base image with s6 overlay
  • weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
  • regular security updates

The architecture supported by this image is:

Architecture Available Tag
x86-64 amd64-<version tag>
arm64 arm64v8-<version tag>

Version Tags

This image provides various versions that are available via tags. Please read the descriptions carefully and exercise caution when using unstable or development tags.

Tag Available Description
latest Stable releases from Hoppscotch

Application Setup

  • Once running the URL will be http://<host-ip>:80 and http://<host-ip>:80/admin (admin).

The application accepts a series of environment variables to further customize itself on boot.

Provided by this repository:

Parameter Function
-e MODE= Default is single but can use nouser or team
-e ENABLE_ADMIN= Default is false. Set to true to build and run admin
-e ENABLE_API= Default is true. Build and run backend
-e ENABLE_SMTP= Default is true. SMTP server that redirect all e-mail to stdout
-e DOMAIN= Default is locahost.
-e SCHEMA= Default is http. Disable httpOnly and secure from Cookie to enable working with http. We recommend change this when https when available.
-e PROXY_HOST= Default is https://proxy.hoppscotch.io. Allow change proxy host on boot
-e PROXY_ENABLED= Default is false. Allow change proxy enabled on boot
-e EXTENSIONS_ENABLED= Default is false. Allow change extensions on boot
-e TELEMETRY_ENABLED= Default is true. Allow change telemetry on boot
-e THEME_COLOR= Default is indigo, values: green, teal, blue, indigo, purple, yellow, orange, red, pink. Allow change theme on boot
-e BG_COLOR= Default is system, values: system, light, dark, black. Allow background color on boot
-e FONT_SIZE= Default is small, values: small, medium, large. Allow change font size on boot
-e ZEN_MODE= Default is false, Allow change zen mode on boot
-e VITE_ADMIN_BASE_URL= Default is /admin. Allow start admin in a custom location
-e SMTP_PROTOCOL= Default is smtp, values: smtp or smtps
-e SMTP_DOMAIN= Default is localhost
-e SMTP_PORT= Default is 25
-e SMTP_USER= Default is nouser
-e SMTP_PASSWORD= Default is nopass
-e POSTGRES_HOST= Default is hoppscotch-db
-e POSTGRES_PORT= Default is 5432
-e POSTGRES_DB= Default is hoppscotch
-e POSTGRES_USER= Default is postgres
-e POSTGRES_PASSWORD= postgres password

Provided by hoppscotch:

Parameter Function
-e DATABASE_URL= Default is postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch if set the individual values for database are ignored.
-e JWT_SECRET= Created on boot if not set. If not set by user not persist when container is recreated.
-e SESSION_SECRET= Created on boot if not set. If not set by user not persist when container is recreated.
-e PRODUCTION= Default is true.
-e TOKEN_SALT_COMPLEXITY= Default is 10.
-e MAGIC_LINK_TOKEN_VALIDITY= Default is 3.
-e REFRESH_TOKEN_VALIDITY= Default is 604800000 (7 days).
-e ACCESS_TOKEN_VALIDITY= Default is 86400000 (1 day).
-e REDIRECT_URL= Default is SCHEMA+DOMAIN.
-e WHITELISTED_ORIGINS= Default is SCHEMA+DOMAIN.
-e VITE_BASE_URL= Default is SCHEMA+DOMAIN.
-e VITE_SHORTCODE_BASE_URL= Default is SCHEMA+DOMAIN.
-e VITE_BACKEND_API_URL= Default is SCHEMA+DOMAIN/api/v1.
-e VITE_BACKEND_GQL_URL= Default is SCHEMA+DOMAIN/api/graphql.
-e VITE_BACKEND_WS_URL= Default is wss://DOMAIN/api/graphql.
-e VITE_ADMIN_URL= Default is SCHEMA+DOMAIN+VITE_ADMIN_BASE_URL.
-e VITE_APP_TOS_LINK= Default is https://docs.hoppscotch.io/support/terms.
-e VITE_APP_PRIVACY_POLICY_LINK= Default is https://docs.hoppscotch.io/support/privacy.
-e GOOGLE_CLIENT_ID= Default is empty.
-e GOOGLE_CLIENT_SECRET= Default is empty.
-e GOOGLE_CALLBACK_URL= Default is SCHEMA+DOMAIN/v1/auth/google/callback.
-e GOOGLE_SCOPE= Default is email,profile.
-e GITHUB_CLIENT_ID= Default is empty.
-e GITHUB_CLIENT_SECRET= Default is empty.
-e GITHUB_CALLBACK_URL= Default is SCHEMA+DOMAIN/v1/auth/github/callback.
-e GITHUB_SCOPE= Default is user:email.
-e MICROSOFT_CLIENT_ID= Default is empty.
-e MICROSOFT_CLIENT_SECRET= Default is empty.
-e MICROSOFT_CALLBACK_URL= Default is SCHEMA+DOMAIN/v1/auth/microsoft/callback.
-e MICROSOFT_SCOPE= Default is user.read.
-e MAILER_ADDRESS_FROM= Default is 'SMTP_USER <SMTP_USER@SMTP_DOMAIN>'. if set the individual values for mailer are ignored.
-e MAILER_SMTP_URL= Default is 'SMTP_PROTOCOL://SMTP_USER@DOMAIN:SMTP_PASSWORD@SMTP_DOMAIN:SMTP_PORT. if set the individual values for smtp are ignored.

Usage

Here are some example snippets to help you get started creating a container.

docker-compose (recommended, click here for more info)

---
version: "2.1"
services:
  hoppscotch:
    image: webysther/hoppscotch:latest
    container_name: hoppscotch
    ports:
      - 80:80
    restart: unless-stopped
docker run -d \
  --name=hoppscotch \
  -p 80:80 \
  --restart unless-stopped \
  webysther/hoppscotch:latest

docker-compose with database

---
version: "2.1"
services:
  hoppscotch:
    image: webysther/hoppscotch:latest
    container_name: hoppscotch
    networks:
      hoppscotch:
      hoppscotch-db:
    environment:
      - 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

docker-compose for teams

---
version: "2.1"
services:
  hoppscotch:
    image: webysther/hoppscotch:latest
    environment:
      - MODE=team
      - DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch
    volumes:
      - /path/to/hoppscotch/config:/config
    ports:
      - 80:80
    restart: unless-stopped

docker-compose with UX customization

---
version: "2.1"
services:
  hoppscotch:
    image: webysther/hoppscotch:latest
    environment:
      - THEME_COLOR=orange
      - BG_COLOR=dark
      - FONT_SIZE=large
      - ZEN_MODE=true
      - EXTENSIONS_ENABLED=true
      - TELEMETRY_ENABLED=false
      - DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch
    volumes:
      - /path/to/hoppscotch/config:/config
    ports:
      - 80:80
    restart: unless-stopped

docker-compose multiple container

This configuration can be expanded to every service in container.

---
version: "2.1"
services:
  hoppscotch:
    image: webysther/hoppscotch:latest
    container_name: hoppscotch
    networks:
      hoppscotch:
    environment:
      - VITE_BACKEND_API_URL=http://hoppscotch-api/api/v1
      - VITE_BACKEND_GQL_URL=http://hoppscotch-api/api/graphql
      - VITE_BACKEND_WS_URL=wss://hoppscotch-api/api/graphql
    ports:
      - 80:80
    restart: unless-stopped

  hoppscotch-api:
    image: webysther/hoppscotch:latest
    container_name: hoppscotch
    networks:
      hoppscotch:
      hoppscotch-db:
    environment:
      - POSTGRES_PASSWORD=password-for-database
    ports:
      - 8080:3170
    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
    restart: unless-stopped

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

Feature: MODE

MODE is ENV variable with default value of single and is used to start all services but admin.

The mode nouser is focused in use standalone without need to have a user, this mode disable SMTP Server and enable ZEN_MODE by default.

The mode team enable admin.

---
...
    environment:
      - MODE=single|nouser|team
...

Feature: Login with SMTP

By default a SMTP server spinup to provide the login facilite by e-mail direct in your docker log. After put you e-mail the click to send a link you be logged to the docker logs, please use this link to login. We recommend to setup a safe SMTP or OAUTH.

Feature: HTTP

By default the current distribution of hoppscotch don't allow you login using http, this is fixed in this PR and can be changed by the ENV SCHEMA.

*****************************************************
INFORMATION
Keep in mind to work in SCHEMA HTTP is necessary
disable 2 security features: httpOnly and secure
- If you is using a reverse proxy you good to go
- Don't use this option direct exposed in production!
*****************************************************

Feature: Build skipped

The current hoppscotch need to be build every time if you change any ENV values, in this PR this the build process is skipped if the ENV don't change, this will not happen if you don't set JWT_SECRET and SESSION_SECRET, because the key is recreated every time the container is restarted.

************************************************
WARNING
JWT_SECRET is automatic created but not
persist when container is recreated, set to fix.
************************************************

************************************************
WARNING
SESSION_SECRET is automatic created but not
persist when container is recreated, set to fix.
************************************************

Parameters

Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <external>:<internal> respectively. For example, -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 outside the container.

Parameter Function
-p 80 Allows HTTP access to the internal webserver.
-e PUID=1000 for UserID - see below for explanation
-e PGID=1000 for GroupID - see below for explanation
-e TZ=Etc/UTC specify a timezone to use, see this list.
-v /config Hoppscotch data

Environment variables from files (Docker secrets)

You can set any environment variable from a file by using a special prepend FILE__.

As an example:

-e FILE__PASSWORD=/run/secrets/mysecretpassword

Will set the environment variable PASSWORD based on the contents of the /run/secrets/mysecretpassword file.

User / Group Identifiers

When using volumes (-v flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID and group PGID.

Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.

In this instance PUID=1000 and PGID=1000, to find yours use id user as below:

  $ id username
    uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)

Docker Mods

Docker Universal Mods

LinuxServer publish various Docker Mods to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.

Support Info

  • Shell access whilst the container is running: docker exec -it hoppscotch /bin/bash
  • To monitor the logs of the container in realtime: docker logs -f hoppscotch
  • container version number
    • docker inspect -f '{{ index .Config.Labels "build_version" }}' hoppscotch

Updating Info

This image is static, versioned, and require an image update and container recreation to update the app inside. Below are the instructions for updating containers:

Via Docker Compose

  • Update all images: docker-compose pull
    • or update a single image: docker-compose pull hoppscotch
  • Let compose update all containers as necessary: docker-compose up -d
    • or update a single container: docker-compose up -d hoppscotch
  • You can also remove the old dangling images: docker image prune

Via Docker Run

  • Update the image: docker pull webysther/hoppscotch:latest
  • Stop the running container: docker stop hoppscotch
  • Delete the container: docker rm hoppscotch
  • Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your /config folder and settings will be preserved)
  • You can also remove the old dangling images: docker image prune

Via Watchtower auto-updater (only use if you don't remember the original parameters)

  • Pull the latest image at its tag and replace it with the same env variables in one run:

    docker run --rm \
    -v /var/run/docker.sock:/var/run/docker.sock \
    containrrr/watchtower \
    --run-once bazarr
  • You can also remove the old dangling images: docker image prune

Note: We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using Docker Compose.

Building locally

If you want to make local modifications to these images for development purposes or just to customize the logic:

git clone https://github.com/webysther/hoppscotch-docker.git
cd hoppscotch-docker
docker build --build-arg HOPPSCOTH_RELEASE="2023.4.7" . -t webysther/hoppscotch:2023.4.7 -t webysther/hoppscotch:latest
docker push webysther/hoppscotch --all-tags

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

[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.

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)

[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

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.

`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.

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!

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.