yarn run v1.22.19
$ strapi develop
debug: ⛔️ Server wasn't able to start properly.
error: Cannot find module '../data/data'
Not sure why it thinks to look for data within data, I only wanted to test it working on the latest image of Postgres, otherwise it's identical. here's my docker-compose.yml:
version: "3"
services:
strapi:
container_name: strapi
build: .
image: strapi:latest
# restart: unless-stopped
env_file: .env
environment:
DATABASE_CLIENT: ${DATABASE_CLIENT}
DATABASE_HOST: postgresDB
DATABASE_NAME: ${DATABASE_NAME}
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PORT: ${DATABASE_PORT}
JWT_SECRET: ${JWT_SECRET}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
NODE_ENV: ${NODE_ENV}
links:
- postgresDB:postgresDB
volumes:
- ./config:/opt/app/config
- ./src:/opt/app/src
- ./package.json:/opt/package.json
- ./yarn.lock:/opt/yarn.lock
- ./.env:/opt/app/.env
ports:
- "1337:1337"
networks:
- strapi
depends_on:
- postgresDB
postgresDB:
image: postgres:latest
container_name: postgresDB
# restart: unless-stopped
env_file: .env
environment:
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
volumes:
- ./data:/var/lib/postgresql/data/
ports:
- "5432:5432"
networks:
- strapi
networks:
strapi:
name: strapi
driver: bridge