Hello
I wanted to deploy postgre as a machine from
I wanted to take higher ownership control of fly.io postgres configuration after last setup and also being able to install LTREE extension.
Can you confirm steps for me because I can’t seem to get it to work. What am I missing?
Instructions that need correction:
git clone GitHub - fly-apps/postgres-flex: Postgres HA setup using repmgr
cd postgres-flex
fly version
fly launch
An existing fly.toml file was found for app postgres-flex
? Would you like to copy its configuration to the new app? Yes
An existing fly.toml file was found for app postgres-flex
? Would you like to copy its configuration to the new app? Yes
Scanning source code
Detected a Go app
App ‘postgres-flex’ already exists. You can deploy to it with fly deploy
.
? Continue launching a new app? Yes
Creating app in /home/lucas/projects/postgres-flex
We’re about to launch your Go app on Fly.io. Here’s what you’re getting:
Organization: Lucas (fly launch defaults to the personal org)
Name: postgres-flex-sun-lucas-7947 (generated)
Region: Chicago, Illinois (US) (from your fly.toml)
App Machines: shared-cpu-1x, 1GB RAM (from your fly.toml)
Postgres: (not requested)
Redis: (not requested)
Tigris: (not requested)
? Do you want to tweak these settings before proceeding? Yes
Opening "https: //fly.io/cli/launch/657764786d6sdd/…
Waiting for launch data… Done
Created app ‘postgres-flex-sun-lucas-7947’ in organization lucas
Admin URL:
Hostname: postgres-flex-
FlyV1 fm2_lJPECAAAAAAAAFZyxBAYUptm6KOg==
Setting FLY_API_TOKEN secret in GitHub repository settings
failed setting FLY_API_TOKEN secret in GitHub repository settings: %w exit status 1
? Overwrite “/home/lucas/projects/postgres-flex/.github/workflows/fly-deploy.yml”? Yes
Wrote config file fly.toml
Validating /home/files/projects/postgres-flex/fly.toml
✓ Configuration is valid
==> Building image
Remote builder fly-builder–hill-4119 ready
Remote builder fly-builder–hill-4119 ready
==> Building image with Docker
→ docker host: 24.0.7 linux x86_64
[+] Building 0.6s (12/13)
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 307B 0.1s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 45B 0.1s
=> [internal] load metadata for Docker Hub Container Image Library | App Containerization 0.2s
=> [internal] load metadata for Docker Hub Container Image Library | App Containerization 0.2s
=> [builder 1/6] FROM Docker Hub Container Image Library | App Containerization 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 7.39kB 0.1s
=> CACHED [stage-1 1/2] FROM Docker Hub Container Image Library | App Containerization 0.0s
=> CACHED [builder 2/6] WORKDIR /usr/src/app 0.0s
=> CACHED [builder 3/6] COPY go.mod go.sum ./ 0.0s
=> CACHED [builder 4/6] RUN go mod download && go mod verify 0.0s
=> [builder 5/6] COPY . . 0.0s
=> ERROR [builder 6/6] RUN go build -v -o /run-app . 0.2s
[builder 6/6] RUN go build -v -o /run-app .:
0.175 no Go files in /usr/src/app
==> Building image
✓ compatible remote builder found
INFO Override builder host with: https://fly-builder--hill-4119.fly.dev (was tcp://[fdaa:0:cee7::89e9:2]:2375)
Remote builder fly-builder–hill-4119 ready
INFO Override builder host with: https://fly-builder--hill-4119.fly.dev (was tcp://[fdaa:0:cee7:9e9:2]:2375)
Remote builder fly-builder–hill-4119 ready
==> Building image with Docker
→ docker host: 24.0.7 linux x86_64
[+] Building 0.4s (12/13)
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 307B 0.1s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 45B 0.1s
=> [internal] load metadata for Docker Hub Container Image Library | App Containerization 0.1s
=> [internal] load metadata for Docker Hub Container Image Library | App Containerization 0.1s
=> [builder 1/6] FROM Docker Hub Container Image Library | App Containerization 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 5.36kB 0.1s
=> CACHED [stage-1 1/2] FROM Docker Hub Container Image Library | App Containerization 0.0s
=> CACHED [builder 2/6] WORKDIR /usr/src/app 0.0s
=> CACHED [builder 3/6] COPY go.mod go.sum ./ 0.0s
=> CACHED [builder 4/6] RUN go mod download && go mod verify 0.0s
=> CACHED [builder 5/6] COPY . . 0.0s
=> ERROR [builder 6/6] RUN go build -v -o /run-app . 0.1s
[builder 6/6] RUN go build -v -o /run-app .:
0.131 no Go files in /usr/src/app
Error: failed to fetch an image or build from source: error building: failed to solve: process “/bin/sh -c go build -v -o /run-app .” did not complete successfully: exit code: 1