fix cities in docker deployment

This commit is contained in:
2024-08-10 16:20:53 +03:00
parent 971d263d35
commit 5ab9e9b026
2 changed files with 5 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ const getClient = async () => {
await client.query("DELETE FROM cities");
//Not sure if pg has support for such kind of things, sooooooooo
exec(`psql -h ${process.env.POSTGRES_HOST} -p ${process.env.POSTGRES_PORT} -d ${process.env.POSTGRES_DB} -U ${process.env.POSTGRES_USER} -f ./cities.sql`, (error) => {
exec(`PGPASSWORD=${process.env.POSTGRES_PASSWORD} psql -h ${process.env.POSTGRES_HOST} -p ${process.env.POSTGRES_PORT} -d ${process.env.POSTGRES_DB} -U ${process.env.POSTGRES_USER} -f ./cities.sql`, (error) => {
if (error) logError(error);
})
}