Skip to content

Fix Postgres migration #1495

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

Merged
merged 8 commits into from
May 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/postgres-database/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN pip --no-cache-dir install --upgrade \
ARG GIT_BRANCH
ARG GIT_REPOSITORY

RUN git clone --single-branch --branch ${GIT_BRANCH} ${GIT_REPOSITORY} \
RUN git clone --single-branch --branch ${GIT_BRANCH} ${GIT_REPOSITORY} osparc-simcore\
&& pip install osparc-simcore/packages/postgres-database[migration]

FROM base as production
Expand All @@ -43,12 +43,13 @@ WORKDIR /home/scu
COPY --from=build ${VIRTUAL_ENV} ${VIRTUAL_ENV}
COPY entrypoint.bash /home/entrypoint.bash

RUN chmod +x /home/entrypoint.bash

ENV POSTGRES_USER=scu \
POSTGRES_PASSWORD=adminadmin \
POSTGRES_HOST=postgres \
POSTGRES_PORT=5432 \
POSTGRES_DB=simcoredb

ENTRYPOINT [ "/bin/sh", "/home/entrypoint.bash" ]
ENTRYPOINT [ "/bin/bash", "/home/entrypoint.bash" ]
CMD [ "sc-pg", "upgrade" ]
1 change: 1 addition & 0 deletions packages/postgres-database/docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ upgrade: ## migrate the postgres database
sleep 1; \
TASK_STATE=$$(docker inspect --format="{{.Status.State}}" $${TASK_ID});\
done
@docker service logs $(APP_NAME)
@docker service rm $(APP_NAME)


Expand Down