hey everyone! Does the Prisma mysql-connector supp...
# orm-help
c
hey everyone! Does the Prisma mysql-connector support MySQL 8.0 at the moment? If it doesn’t, is there a roadmap, when it will be supported?
n
At this point, this is neither confirmed nor denied - did you try it out already? 🙂 There's a good chance that it "just works"
c
I have not tried it out yet but I’ll to that 😄 Currently I’m trying to get the typescript-advanced boilerplate working inside a Docker container (so that yoga also runs in it’s own container). Do you know of any docker-compose file that already exists for such case or do I have to figure this out by myself?
n
I've seen someone share a similar docker-compose file here before
m
I have one.
Copy code
version: '3'
services:
  yoga: 
    build: . 
    restart: always
    container_name: graphql-yoga
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"
    env_file: 
      - .env
    volumes:
      - .:/usr/app
    ports: 
      - "4000:4000"
    stdin_open: true
    tty: true
    depends_on: 
      - postgres
      - prisma
    command: yarn dev
  prisma: 
    image: prismagraphql/prisma:1.10.2
    restart: always
    ports: 
    - "4466:4466"
    environment: 
      PRISMA_CONFIG: |
        port: 4466
        # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
        # managementApiSecret: my-secret
        databases:
          default:
            connector: postgres
            host: postgres
            port: 5432
            user: prisma
            password: prisma
            migrations: true
  postgres:
    image: postgres
    restart: always
    environment:
      POSTGRES_USER: prisma
      POSTGRES_PASSWORD: prisma
    volumes:
      - postgres:/var/lib/postgresql/data
volumes:
  postgres:
The key here (if you're calling
prisma deploy
from your yoga container) is to make sure your
yoga
container doesn't spin up until
prisma
is listening for incoming connections, otherwise you will err out.
c
thanks for the fast answers! 🙂
👍 1
m
This is my Dockerfile for `yoga`:
Copy code
FROM mhart/alpine-node:latest

WORKDIR /usr/app/

RUN apk add --no-cache bash

COPY package*.json yarn.lock ./
RUN yarn
RUN yarn global add prisma graphql-cli --prefix /usr/local

COPY . .

ENV PORT 4000
EXPOSE 4000
And, then, in package.json, i have the following:
Copy code
...
"prisma": "./build-utils/wait-for-it.sh prisma:4466 -- prisma deploy",
...