Skip to content

Commit

Permalink
fix: Unable to run migrations in latest image. Added option to run no…
Browse files Browse the repository at this point in the history
…n-SSL migration in production
  • Loading branch information
tommoor committed Sep 27, 2020
1 parent 1d5f735 commit 6bb32c2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ COPY . .

RUN yarn build && \
yarn --production --ignore-scripts --prefer-offline && \
rm -rf server && \
rm -rf shared && \
rm -rf app

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ For a manual self-hosted production installation these are the suggested steps:
1. `REDIS_URL` (run your own local copy of Redis, or use a cloud service)
1. `URL` (the public facing URL of your installation)
1. `AWS_` (all of the keys beginning with AWS)
1. Migrate database schema with `yarn sequelize:migrate`
1. Migrate database schema with `yarn sequelize:migrate`. Production assumes an SSL connection, if
Postgres is on the same machine and is not SSL you can migrate with `yarn sequelize:migrate --env=production-ssl-disabled`.
1. Start the service with any daemon tools you prefer. Take PM2 for example, `NODE_ENV=production pm2 start ./build/server/index.js --name outline `
1. Visit http://you_server_ip:3000 and you should be able to see Outline page

Expand Down
4 changes: 4 additions & 0 deletions server/config/database.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@
"rejectUnauthorized": false
}
}
},
"production-ssl-disabled": {
"use_env_variable": "DATABASE_URL",
"dialect": "postgres"
}
}

0 comments on commit 6bb32c2

Please sign in to comment.