diff --git a/templates/with-postgres/docker-compose.yml b/templates/with-postgres/docker-compose.yml index 3aba7cc7e2a..4fcff4ffd39 100644 --- a/templates/with-postgres/docker-compose.yml +++ b/templates/with-postgres/docker-compose.yml @@ -11,33 +11,20 @@ services: working_dir: /home/node/app/ command: sh -c "corepack enable && corepack prepare pnpm@latest --activate && pnpm install && pnpm dev" depends_on: - - mongo - # - postgres + - postgres + env_file: - .env - # Ensure your DATABASE_URI uses 'mongo' as the hostname ie. mongodb://mongo/my-db-name - mongo: - image: mongo:latest - ports: - - '27017:27017' - command: - - --storageEngine=wiredTiger + postgres: + restart: always + image: postgres:latest volumes: - - data:/data/db - logging: - driver: none - - # Uncomment the following to use postgres - # postgres: - # restart: always - # image: postgres:latest - # volumes: - # - pgdata:/var/lib/postgresql/data - # ports: - # - "5432:5432" + - pgdata:/var/lib/postgresql/data + ports: + - "5432:5432" volumes: data: - # pgdata: + pgdata: node_modules: