fix: Unable to run migrations in latest image. Added option to run non-SSL migration in production

This commit is contained in:
Tom Moor 2020-09-27 10:32:08 -07:00
parent 1d5f735032
commit 6bb32c253b
3 changed files with 6 additions and 2 deletions

View File

@ -14,7 +14,6 @@ COPY . .
RUN yarn build && \
yarn --production --ignore-scripts --prefer-offline && \
rm -rf server && \
rm -rf shared && \
rm -rf app

View File

@ -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

View File

@ -15,5 +15,9 @@
"rejectUnauthorized": false
}
}
},
"production-ssl-disabled": {
"use_env_variable": "DATABASE_URL",
"dialect": "postgres"
}
}