uncertain what Dockerfile and docker-compose should have when choosing Postgres #5006
Replies: 4 comments 13 replies
-
Hey @mpstaton — our current Dockerfile does not come with Postgres. You would need to edit your Dockerfile to include a Postgres installation, or install Postgres locally and use that. However, I'm going to convert this to a feature request so we can track it accordingly! |
Beta Was this translation helpful? Give feedback.
-
@jmikrut honestly that sounds like a rabbit hole. What version of Postgres is it compatible with? Why offer an option for Postgres without warnings that I would need to figure out my own installation of Postgres and cross my fingers that it works? I have Postgres installed, but I don't even know if I have to start it myself? Seems like you guys are missing some helpful info somewhere. |
Beta Was this translation helpful? Give feedback.
-
As a new user that was just trying to make things run, this doesn't inspire much confidence. I followed the quick start guide, chose Postgres and then the app fails to start. No mention that I should setup my own DB first or what is expected. |
Beta Was this translation helpful? Give feedback.
-
Agreed with the sentiment above. The docs are a bit unclear. I create the app, jump over to the app-configuration steps, but no mention of how to set up the postgres connection or configuring with Docker. Nothing I can't research and learn, but you see where I'm coming from. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Documentation Issue
I chose the Postgres option in setup. App won't start from Yarn Dev It has no trace of the word Postgres anywhere.
Additional Details
/* command line error log*/
20:12:07 ~/code/colearn/v01-payload/light-house $ yarn dev
yarn run v1.22.19
warning ../../../../package.json: No license field
$ cross-env PAYLOAD_CONFIG_PATH=src/payload/payload.config.ts nodemon
[nodemon] 2.0.22
[nodemon] to restart at any time, enter
rs
[nodemon] watching path(s): .
[nodemon] watching extensions: ts
[nodemon] starting
ts-node src/server.ts -- -I
[20:12:19] ERROR (payload): Error: cannot connect to Postgres. Details: connect ECONNREFUSED 127.0.0.1:5432
[nodemon] app crashed - waiting for file changes before starting...
^C
/* package.json */
{
"name": "lightHouse",
"description": "Website template for Payload",
"version": "1.0.0",
"main": "dist/server.js",
"license": "MIT",
"scripts": {
"dev": "cross-env PAYLOAD_CONFIG_PATH=src/payload/payload.config.ts nodemon",
"seed": "rm -rf media && cross-env PAYLOAD_SEED=true PAYLOAD_DROP_DATABASE=true PAYLOAD_CONFIG_PATH=src/payload/payload.config.ts ts-node src/server.ts",
"build:payload": "cross-env PAYLOAD_CONFIG_PATH=src/payload/payload.config.ts payload build",
"build:server": "tsc --project tsconfig.server.json",
"build:next": "cross-env PAYLOAD_CONFIG_PATH=dist/payload/payload.config.js NEXT_BUILD=true node dist/server.js",
"build": "cross-env NODE_ENV=production yarn build:payload && yarn build:server && yarn copyfiles && yarn build:next",
"serve": "cross-env PAYLOAD_CONFIG_PATH=dist/payload/payload.config.js NODE_ENV=production node dist/server.js",
"eject": "yarn remove next react react-dom @next/eslint-plugin-next && ts-node eject.ts",
"copyfiles": "copyfiles -u 1 "src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,js}" dist/",
"generate:types": "cross-env PAYLOAD_CONFIG_PATH=src/payload/payload.config.ts payload generate:types",
"generate:graphQLSchema": "cross-env PAYLOAD_CONFIG_PATH=src/payload/payload.config.ts payload generate:graphQLSchema",
"lint": "eslint src",
"lint:fix": "eslint --fix --ext .ts,.tsx src",
"payload": "cross-env PAYLOAD_CONFIG_PATH=src/payload/payload.config.ts payload"
},
"dependencies": {
"@payloadcms/bundler-webpack": "^1.0.0",
"@payloadcms/db-postgres": "^0.x",
"@payloadcms/plugin-cloud": "^3.0.0",
"@payloadcms/plugin-nested-docs": "^1.0.8",
"@payloadcms/plugin-redirects": "^1.0.0",
"@payloadcms/plugin-seo": "^1.0.10",
"@payloadcms/richtext-slate": "^1.0.0",
"cross-env": "^7.0.3",
"dotenv": "^8.2.0",
"escape-html": "^1.0.3",
"express": "^4.17.1",
"next": "13.5.2",
"payload": "^2.0.0",
"payload-admin-bar": "^1.0.6",
"qs": "6.11.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "7.45.4",
"react-router-dom": "5.3.4"
},
"devDependencies": {
"@next/eslint-plugin-next": "^13.1.6",
"@payloadcms/eslint-config": "^0.0.1",
"@swc/core": "1.3.76",
"@types/escape-html": "^1.0.2",
"@types/express": "^4.17.9",
"@types/node": "18.11.3",
"@types/qs": "^6.9.8",
"@types/react": "18.0.21",
"@typescript-eslint/eslint-plugin": "^5.51.0",
"@typescript-eslint/parser": "^5.51.0",
"copyfiles": "^2.4.1",
"eslint": "^8.19.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
"nodemon": "^2.0.6",
"prettier": "^2.7.1",
"slate": "0.91.4",
"ts-node": "10.9.1",
"typescript": "^4.8.4"
}
}
Beta Was this translation helpful? Give feedback.
All reactions