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

This is awesome! #3

Open
kubeworkz opened this issue Oct 3, 2022 · 1 comment
Open

This is awesome! #3

kubeworkz opened this issue Oct 3, 2022 · 1 comment

Comments

@kubeworkz
Copy link

kubeworkz commented Oct 3, 2022

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:
@ITenthusiasm
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants