Using Strapi v4 with Docker

Поделиться
HTML-код
  • Опубликовано: 29 окт 2024

Комментарии • 25

  • @MattieBelt
    @MattieBelt 2 года назад +8

    Huge credits to Simen!

    • @Eventyret
      @Eventyret 2 года назад +2

      Thank you @mattias

  • @韩北坡
    @韩北坡 4 месяца назад +2

    docker image success , thank you.

  • @greendsnow
    @greendsnow 2 года назад +3

    Can I create Database in Docker Image after loading it to the cloud? add plugins ? or even customize it?

  • @wariomn
    @wariomn 2 года назад +3

    Hi, good video and blog post. I'm missing one thing - what about image/media files uploaded in strapi?

    • @Eventyret
      @Eventyret 2 года назад +2

      If you want to do that you need to use an external provider. Or bind mount a folder on the server to the container.
      Hope it helps.

    • @wariomn
      @wariomn 2 года назад +1

      @@Eventyret yeah exactly what I had in mind, but wanted to confirm.
      Thanks!

  • @ZacharyBurgess
    @ZacharyBurgess 10 месяцев назад +1

    If you run into this error: error docker-strapi-tutorial@0.1.0: The engine "node" is incompatible with this module. Expected version ">=18.0.0

    • @Strapi
      @Strapi  9 месяцев назад

      Thank you.

  • @thomasapfelbacher9308
    @thomasapfelbacher9308 Год назад

    The link to the uick start quide is malformated. so there shows up a 404

  • @shuaibabdulgafar1040
    @shuaibabdulgafar1040 2 года назад +2

    Any ideas how to reduce the image size? 2.7Gb is quite large

    • @tobi_k
      @tobi_k 2 года назад +1

      One possible solution might be to use the node:17-alpine Docker image instead as your base image… since the alpine based image is usually significantly smaller than the Debian based version this should reduce your final image size… keep in mind though that you have to use apk instead of apt to install any required dependencies.

  • @RohithAerva
    @RohithAerva 2 месяца назад

    => ERROR [ 4/10] COPY ./package.json ./yarn.lock ./
    getting this error
    what shoud I do ?

  • @praweewongsa
    @praweewongsa 2 года назад

    Thank you sir.

  • @user-me5rv7kq1s
    @user-me5rv7kq1s 2 года назад +1

    why don't you guys have strapi v4 official docker image already when it's most asked feature on votepage?

    • @pierreburgy7442
      @pierreburgy7442 2 года назад +3

      The reason is that Strapi is designed to be installed locally and deployed to production with your own configuration files. As a result, we recommend using the Dockerfile described in the video but build your own Docker image (dedicated to your Strapi project).

    • @DaveThomson
      @DaveThomson Год назад

      ​@@pierreburgy7442configuration should be passed in. I don't want to bake config into every containter i run.

  • @salvimateus
    @salvimateus 2 года назад +4

    why not use docker-compose?

    • @edwardalmanzar8382
      @edwardalmanzar8382 2 года назад +3

      Why not Kubernetes ? 😂

    • @edwardalmanzar8382
      @edwardalmanzar8382 2 года назад +9

      version: '3.7'
      services:
      postgres:
      container_name: postgres_container
      image: postgres:12
      restart: always
      environment:
      POSTGRES_DB: strapi
      POSTGRES_USER: strapi
      POSTGRES_PASSWORD: strapi
      volumes:
      - postgres-data:/var/lib/postgresql/data
      ports:
      - '5433:5432'
      networks:
      - your-network

      strapi:
      container_name: strapi_container
      image: strapi/strapi
      restart: always
      environment:
      DATABASE_CLIENT: postgres
      DATABASE_NAME: strapi
      DATABASE_HOST: postgres
      DATABASE_PORT: 5432
      DATABASE_USERNAME: strapi
      DATABASE_PASSWORD: strapi
      volumes:
      - ./app:/srv/app
      ports:
      - '1337:1337'
      networks:
      - your-network
      depends_on:
      - postgres
      pgadmin:
      container_name: pgadmin_container
      image: dpage/pgadmin4
      environment:
      PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-your@email.com}
      PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-your-password}
      volumes:
      - pgadmin:/root/.pgadmin
      ports:
      - "${PGADMIN_PORT:-5050}:80"
      networks:
      - your-network
      restart: unless-stopped
      networks:
      your-network:
      driver: bridge
      volumes:
      postgres-data:
      pgadmin:

    • @Eventyret
      @Eventyret 2 года назад +1

      The written guide has a docker-compose i believe or the Heroku guide I wrote has it atleast.

  • @YiannisChristodoulou
    @YiannisChristodoulou 2 года назад +1

    Which VS Code theme is this?

    • @lostin8159
      @lostin8159 2 года назад +2

      It may be "Atom One Light Theme".

  • @qavinizamani5889
    @qavinizamani5889 2 года назад

    With npm throwing build error