How to create docker compose file which installs prisma v5?

85 Views Asked by At

I have this docker-compose.yml file. It uses prisma v1.12.
I want to create prisma docker with latest prisma.How to implement?

version: '3'
services:
  prisma:
    image: prismagraphql/prisma:1.12
    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: ec2-50-16-241-91.compute-1.amazonaws.com
            port: '5432'
            database: d63k1orhak3ro8
            ssl: true
            user: ijgyrvqtpinnqe
            password: 45c5b8e5eb835c06d51150e5869b655590c01d0ace319ac6bb8e01cfa57f55b2
            migrations: true

I checked on docker hub,I think they have stopped creating prisma docker with latest version.
Should I create my own prisma docker and upload in docker hub?If yes,then how to implement that?

1

There are 1 best solutions below

0
Pino On

docker-compose does not install anything: it executes existing images. Since you don't have an image with Prima v5 you have to create it. To create it you have to write a Dockerfile, not docker-compose. Simply speaking, in the Dockerfile you have to put the same instructions that you would use to install Prisma on a Linux machine without Docker. Do you know these instructions? If not (like me!), you have to:

  1. study Prisma documentation,
  2. try a manual install,
  3. and then put the instructions in the Dockerfile using the correct syntax.

An alternative is to search on Docker Hub to see if someone has created an unofficial image of Prisma v5.