Skip to content

Commit 0f4ddf0

Browse files
authored
Merge pull request #4 from fly-apps/quick-connect
Adding quick connect script
2 parents db514f3 + 12f605c commit 0f4ddf0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ COPY . .
88

99
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/flyadmin ./cmd/flyadmin
1010
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/start ./cmd/start
11+
COPY ./bin/* /fly/bin/
1112

1213
FROM postgres:${PG_VERSION}
1314
ENV PGDATA=/data/pg_data

bin/connect

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
DATABASE=${1:-postgres}
4+
USERNAME=${2:-postgres}
5+
PASSWORD=${3:-$OPERATOR_PASSWORD}
6+
7+
psql postgres://$USERNAME:$PASSWORD@$FLY_APP_NAME.internal:5432/$DATABASE

0 commit comments

Comments
 (0)