strapi / strapi-docker

Install and run your first Strapi project using Docker
https://strapi.io
MIT License
1.16k stars 447 forks source link

Make sure the directory ./config/environments/production exists #249

Closed wahengchang closed 3 years ago

wahengchang commented 3 years ago

I am trying to connect strapi with mlab, and I fellowed what the doc's step. and I modified .env as the mlab config

this isdocker-compose.yml

#docker-compose.yml
version: '3'

services:
  strapi:
    container_name: strapi
    image: strapi/strapi
    environment:
      DATABASE_CLIENT: ${DATABASE_CLIENT}
      DATABASE_NAME: ${DATABASE_NAME}
      DATABASE_HOST: ${DATABASE_HOST}
      DATABASE_PORT: ${DATABASE_PORT}
      DATABASE_USERNAME: ${DATABASE_USERNAME}
      DATABASE_PASSWORD: ${DATABASE_PASSWORD}
      NODE_ENV: production
    ports:
      - 1337:1337
    volumes:
      - ./app:/srv/app

when i run

$ docker-compose up 

and run

$ docker-compose up 
Recreating strapi ... done
Attaching to strapi
strapi    | Starting your app...
strapi    | Missing environment config for env: production.
strapi    | Make sure the directory ./config/environments/production exists
strapi exited with code 1
wahengchang commented 3 years ago

It seem like we will need to create ./config/environments/-

as the explain : https://github.com/strapi/strapi/issues/3673

if it is true, what is the point that we are using docker ?

alexandrebodin commented 3 years ago

You are clearly trying to run a strapi version prior to the stable strapi version but you are using the latest strapi docker build. Make sure to run the corresponding image if you want your app to run :)

Closing for now