remix-supertokens icon indicating copy to clipboard operation
remix-supertokens copied to clipboard

This is awesome!

Open kubeworkz opened this issue 3 years ago • 1 comments

remix-supertokens.tar.gz

Definitely needed SuperTokens for Remix. I'd like to help out. I added prisma/postgresql and tailwindcss. The prisma schema is the Supertokens postgres db schema.

Here's the docker-compose.yaml used to fire up the backend.

version: '3'

services:
  db:
    image: 'postgres:latest'
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_DB: supertokens
    ports:
      - 5432:5432
    networks:
      - app_network
    restart: unless-stopped
    healthcheck:
      test: ['CMD', 'pg_isready -U postgres']
      interval: 5s
      timeout: 5s
      retries: 5
    volumes:
      - pgdata:/var/lib/postgresql/data

  supertokens:
    image: registry.supertokens.io/supertokens/supertokens-postgresql
    depends_on:
      - db
    ports:
      - 3567:3567
    environment:
      POSTGRESQL_CONNECTION_URI: "postgresql://postgres:postgres@db:5432/supertokens"
    networks:
      - app_network
    restart: unless-stopped
    healthcheck:
      test: >
        bash -c 'exec 3<>/dev/tcp/127.0.0.1/3567 && echo -e "GET /hello HTTP/1.1\r\nhost: 127.0.0.1:3567\r\nConnection: close\r\n\r\n" >&3 && cat 
<&3 | grep "Hello"'
      interval: 10s
      timeout: 5s
      retries: 5

networks:
  app_network:
    driver: bridge

volumes:
    pgdata:

kubeworkz avatar Oct 03 '22 00:10 kubeworkz

Thanks for sharing! I haven't had a chance to look through everything you included yet, but I will try to when I get the chance.

ITenthusiasm avatar Oct 05 '22 13:10 ITenthusiasm

So I think I'm going to close this for now if that's okay. If you decide you want to fork the repo and add any additional contributions, I'd be more than happy to review them!

Please note that I am trying to keep this repo minimal, however. The reason for this is that I want to remove as many barriers as possible to developers understanding how to integrate SuperTokens with Remix.

ITenthusiasm avatar Oct 21 '24 23:10 ITenthusiasm