Skip to content
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

feat: implement ftl box run #1881

Merged
merged 1 commit into from
Jun 26, 2024
Merged

feat: implement ftl box run #1881

merged 1 commit into from
Jun 26, 2024

Conversation

alecthomas
Copy link
Collaborator

@alecthomas alecthomas commented Jun 26, 2024

This required some changes to how the build engine works, in that build and deploy can now be run separately.

Building the box:

🐚 ~/dev/ftl $ ftl box echo examples/go
info:time: Building module
info:echo: Building module
info: Building image echo

Running locally:

🐚 ~/dev/ftl $ ftl box-run --dsn="postgres://postgres:secret@localhost:15432/ftl?sslmode=disable" examples/go/
info: Web console available at: http://0.0.0.0:8892
info: HTTP ingress server listening on: http://0.0.0.0:8891
info:time: Deploying module
info: Reusing deployment: dpl-time-xpun6vddce07f5s
info: Deployed dpl-echo-1bd1tvnmig06767u
info: Deployed dpl-time-xpun6vddce07f5s
info:echo: Deploying module
info: Reusing deployment: dpl-echo-1bd1tvnmig06767u
info: All modules deployed

Running the resulting image works but we need to set up Docker compose with PG:

🐚 ~/dev/ftl $ docker run --platform linux/amd64 echo
ftl: error: failed to create database: database not ready after 10 tries: failed to connect to `user=postgres database=`:
             127.0.0.1:5432 (localhost): dial error: dial tcp 127.0.0.1:5432: connect: connection refused
             [::1]:5432 (localhost): dial error: dial tcp [::1]:5432: connect: connection refused

@alecthomas alecthomas requested review from safeer, a team and worstell and removed request for a team June 26, 2024 12:59
@ftl-robot ftl-robot mentioned this pull request Jun 26, 2024
This required some changes to how the build engine works, in that build
+ deploy can now be run separately.

Building the box:

```
🐚 ~/dev/ftl $ ftl box echo examples/go
info:time: Building module
info:echo: Building module
info: Building image echo
```

Running locally:

```
🐚 ~/dev/ftl $ ftl box-run --dsn="postgres://postgres:secret@localhost:15432/ftl?sslmode=disable" examples/go/
info: Web console available at: http://0.0.0.0:8892
info: HTTP ingress server listening on: http://0.0.0.0:8891
info:time: Deploying module
info: Reusing deployment: dpl-time-xpun6vddce07f5s
info: Deployed dpl-echo-1bd1tvnmig06767u
info: Deployed dpl-time-xpun6vddce07f5s
info:echo: Deploying module
info: Reusing deployment: dpl-echo-1bd1tvnmig06767u
info: All modules deployed
```

Running the resulting image works but we need to set up Docker compose with PG:

```
🐚 ~/dev/ftl $ docker run --platform linux/amd64 echo
ftl: error: failed to create database: database not ready after 10 tries: failed to connect to `user=postgres database=`:
             127.0.0.1:5432 (localhost): dial error: dial tcp 127.0.0.1:5432: connect: connection refused
             [::1]:5432 (localhost): dial error: dial tcp [::1]:5432: connect: connection refused
```
@alecthomas alecthomas merged commit 6296412 into main Jun 26, 2024
43 checks passed
@alecthomas alecthomas deleted the aat/ftl-box-run branch June 26, 2024 13:59
jonathanj-square pushed a commit that referenced this pull request Jun 26, 2024
This required some changes to how the build engine works, in that build
and deploy can now be run separately.

Building the box:

```
🐚 ~/dev/ftl $ ftl box echo examples/go
info:time: Building module
info:echo: Building module
info: Building image echo
```

Running locally:

```
🐚 ~/dev/ftl $ ftl box-run --dsn="postgres://postgres:secret@localhost:15432/ftl?sslmode=disable" examples/go/
info: Web console available at: http://0.0.0.0:8892
info: HTTP ingress server listening on: http://0.0.0.0:8891
info:time: Deploying module
info: Reusing deployment: dpl-time-xpun6vddce07f5s
info: Deployed dpl-echo-1bd1tvnmig06767u
info: Deployed dpl-time-xpun6vddce07f5s
info:echo: Deploying module
info: Reusing deployment: dpl-echo-1bd1tvnmig06767u
info: All modules deployed
```

Running the resulting image works but we need to set up Docker compose
with PG:

```
🐚 ~/dev/ftl $ docker run --platform linux/amd64 echo
ftl: error: failed to create database: database not ready after 10 tries: failed to connect to `user=postgres database=`:
             127.0.0.1:5432 (localhost): dial error: dial tcp 127.0.0.1:5432: connect: connection refused
             [::1]:5432 (localhost): dial error: dial tcp [::1]:5432: connect: connection refused
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant