Skip to content

Commit

Permalink
fix migrations and add to docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
ldscavo committed Sep 30, 2024
1 parent 5789bc6 commit 81df0f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ FROM node:10.24.1-alpine3.11
WORKDIR /app
COPY . .
RUN npm install
RUN npm run migrate
EXPOSE 8080
CMD [ "node", "./server" ]
24 changes: 6 additions & 18 deletions knexfile.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
var dotenv = require('dotenv');
dotenv.config();

dotenv.config();

module.exports = {

development: {
client: 'postgresql',
connection: process.env.DATABASE_URL,
},
production: {
client: 'postgresql',
connection: process.env.DATABASE_URL,
pool: {
min: 2,
max: 10
},
migrations: {
tableName: 'knex_migrations'
}
}
client: 'pg',
connection: process.env.DATABASE_URL,
migrations: {
tableName: 'knex_migrations'
}
};

0 comments on commit 81df0f6

Please sign in to comment.