Commit c86cf346 authored by Yannis Barlas's avatar Yannis Barlas
Browse files

Merge branch 'xsweet' into 'master'

fix(job-xsweet): upgrade node & change env vars

See merge request !710
parents adc5d3f7 323149a9
Pipeline #18522 failed with stages
in 66 minutes and 41 seconds
FROM node:11
FROM node:12.21
WORKDIR /home/node
......
......@@ -24,9 +24,9 @@ This publishes a job that the job runner (a Docker container) picks up.
## Docker container
Run it with: `docker run -e DATABASE_URL=yourdatabaseurl pubsweet/job-xsweet:latest` (e.g. postgres://username:password@host.docker.internal:5432/yourdb)
Run it with: `docker run -e POSTGRES_HOST=yourdbhost -e POSTGRES_PORT=yourdbport -e POSTGRES_DB=yourdatabasename -e POSTGRES_USER=yourdbusername -e POSTGRES_PASSWORD=yourdbpassword pubsweet/job-xsweet:latest`
The DATABASE_URL is needed so that the Docker container knows how to connect to your database.
The environment variables are needed so that the Docker container knows how to connect to your database.
After the Docker container starts up, jobs from the endpoint will start to be processed.
......
module.exports = {
'pubsweet-server': {
db: {
host: 'POSTGRES_HOST',
port: 'POSTGRES_PORT',
database: 'POSTGRES_DB',
user: 'POSTGRES_USER',
password: 'POSTGRES_PASSWORD',
},
},
}
module.exports = {
'pubsweet-server': {
db: encodeURI(process.env.DATABASE_URL),
},
'pubsweet-server': {},
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment