-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update deployment to run migrations as a separate step #1778
Changes from all commits
9a77323
fa29d58
f788e2b
7dd080b
b453101
91dcb8e
7a60c87
60d5186
223f14b
3a1d91e
c7f5ddd
0291bbe
3c07142
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM node:18.6.0-slim | ||
ARG CI=1 | ||
RUN apt-get update && apt-get install -y postgresql | ||
RUN npm install -g [email protected] | ||
WORKDIR /boxel | ||
COPY . . | ||
RUN pnpm install --frozen-lockfile | ||
|
||
WORKDIR /boxel/packages/postgres | ||
|
||
CMD ./node_modules/.bin/node-pg-migrate --check-order false --migrations-table migrations up && sleep infinity |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#! /bin/sh | ||
if [ -z "$(docker ps -f name=boxel-pg --all --format '{{.Names}}')" ]; then | ||
# running postgres on port 5435 so it doesn't collide with native postgres | ||
# that may be running on your system | ||
docker run --name boxel-pg -e POSTGRES_HOST_AUTH_METHOD=trust -p 5435:5432 -d postgres:16.3 >/dev/null | ||
else | ||
docker start boxel-pg >/dev/null | ||
fi |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is just a rename--the symlink i made to it confused github |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#! /bin/sh | ||
docker stop boxel-pg >/dev/null |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it was so convenient having this script here I decided to just sym link it to its new location |
This file was deleted.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it was so convenient having this script here I decided to just sym link it to its new location |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../postgres/scripts/start-pg.sh |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../postgres/scripts/stop-pg.sh |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just a rename--the symlink i made to it confused github