Remove migration from dockerfile.
This commit is contained in:
parent
61e04e1d9a
commit
9347affb77
@ -44,7 +44,6 @@ COPY --chown=5000:5000 --from=builder /go/src/github.com/vulcanize/ipld-eth-serv
|
|||||||
# keep binaries immutable
|
# keep binaries immutable
|
||||||
COPY --from=builder /go/src/github.com/vulcanize/ipld-eth-server/ipld-eth-server ipld-eth-server
|
COPY --from=builder /go/src/github.com/vulcanize/ipld-eth-server/ipld-eth-server ipld-eth-server
|
||||||
COPY --from=builder /goose goose
|
COPY --from=builder /goose goose
|
||||||
COPY --from=builder /go/src/github.com/vulcanize/ipld-eth-server/db/migrations migrations/vulcanizedb
|
|
||||||
COPY --from=builder /go/src/github.com/vulcanize/ipld-eth-server/environments environments
|
COPY --from=builder /go/src/github.com/vulcanize/ipld-eth-server/environments environments
|
||||||
|
|
||||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||||
|
@ -50,7 +50,6 @@ services:
|
|||||||
DATABASE_USER: "vdbm"
|
DATABASE_USER: "vdbm"
|
||||||
DATABASE_PASSWORD: "password"
|
DATABASE_PASSWORD: "password"
|
||||||
ETH_CHAIN_ID: 4
|
ETH_CHAIN_ID: 4
|
||||||
RUN_DB_MIGRATION: "no"
|
|
||||||
volumes:
|
volumes:
|
||||||
- type: bind
|
- type: bind
|
||||||
source: ./chain.json
|
source: ./chain.json
|
||||||
|
@ -1,23 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Runs the db migrations and starts the watcher services
|
|
||||||
|
|
||||||
# Construct the connection string for postgres
|
|
||||||
VDB_PG_CONNECT=postgresql://$DATABASE_USER:$DATABASE_PASSWORD@$DATABASE_HOSTNAME:$DATABASE_PORT/$DATABASE_NAME?sslmode=disable
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$RUN_DB_MIGRATION" != "no" ]
|
|
||||||
then
|
|
||||||
# Run the DB migrations
|
|
||||||
echo "Connecting with: $VDB_PG_CONNECT"
|
|
||||||
echo "Running database migrations"
|
|
||||||
./goose -dir migrations/vulcanizedb postgres "$VDB_PG_CONNECT" up
|
|
||||||
rv=$?
|
|
||||||
|
|
||||||
if [ $rv != 0 ]; then
|
|
||||||
echo "Could not run migrations. Are the database details correct?"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Beginning the ipld-eth-server process"
|
echo "Beginning the ipld-eth-server process"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user