Skip to content

Commit 99d8eae

Browse files
committed
make it work locally fingers crossed
1 parent 18b0ffc commit 99d8eae

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*
2+
!migrations
23
!src
34
!Cargo.*
45
!githubuser-backup.pg

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
build:
55
context: .
66
target: builder
7-
command: ./setup-db.sh && cargo run --release --locked
7+
command: ./setup-db.sh cargo run --release --locked
88
depends_on:
99
- db
1010
ports:

setup-db.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -xe
44

5-
export DATABASE_URL="postgres://postgres:ughfineokifitsfordebugging@localhost:54320/rfcbot"
5+
DATABASE_URL="${DATABASE_URL:-postgres://postgres:ughfineokifitsfordebugging@localhost:54320/rfcbot}"
66

77
until psql -d "$DATABASE_URL" -c '\q'; do
88
>&2 echo "Postgres is unavailable - sleeping"
@@ -14,3 +14,5 @@ done
1414
diesel database setup
1515
diesel migration run
1616
psql -q -d "$DATABASE_URL" --file ./githubuser-backup.pg
17+
18+
exec "$@"

0 commit comments

Comments
 (0)