-
Notifications
You must be signed in to change notification settings - Fork 31
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
Dev server running in docker #67
Conversation
Codecov Report
@@ Coverage Diff @@
## main #67 +/- ##
==========================================
+ Coverage 75.91% 76.68% +0.77%
==========================================
Files 50 50
Lines 411 386 -25
==========================================
- Hits 312 296 -16
+ Misses 99 90 -9
Continue to review full report at Codecov.
|
I think we need to exclude both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, but I'm not able to get up and running via the Readme. I get this on my first and second attempt:
~/lightning docker-dev ❯ docker compose up 4m 37s erl 24.2.1 elixir 1.13.2-otp-24 07:55:58
[+] Running 2/0
⠿ Container lightning-postgres-1 Running 0.0s
⠿ Container lightning-web-1 Created 0.1s
Attaching to lightning-postgres-1, lightning-web-1
lightning-web-1 | Interactive Elixir (1.13.3) - press Ctrl+C to exit (type h() ENTER for help)
lightning-web-1 exited with code 0
^CGracefully stopping... (press Ctrl+C again to force)
[+] Running 4/4
⠿ Container lightning_web_run_41743a2aa9ab Stopped 0.0s
⠿ Container lightning-web-1 Stopped 0.0s
⠿ Container lightning_web_run_fb96305976f4 Stopped 0.0s
⠿ Container lightning-postgres-1 Stopped 0.1s
canceled
~/lightning docker-dev ❯ docker compose up ✘ INT 15s erl 24.2.1 elixir 1.13.2-otp-24 07:56:59
[+] Running 2/0
⠿ Container lightning-postgres-1 Created 0.0s
⠿ Container lightning-web-1 Created 0.0s
Attaching to lightning-postgres-1, lightning-web-1
lightning-postgres-1 |
lightning-postgres-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
lightning-postgres-1 |
lightning-postgres-1 | 2022-04-06 06:57:01.118 UTC [1] LOG: starting PostgreSQL 14.2 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 10.3.1_git20211027) 10.3.1 20211027, 64-bit
lightning-postgres-1 | 2022-04-06 06:57:01.118 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
lightning-postgres-1 | 2022-04-06 06:57:01.118 UTC [1] LOG: listening on IPv6 address "::", port 5432
lightning-postgres-1 | 2022-04-06 06:57:01.120 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
lightning-postgres-1 | 2022-04-06 06:57:01.125 UTC [22] LOG: database system was shut down at 2022-04-06 06:56:59 UTC
lightning-postgres-1 | 2022-04-06 06:57:01.129 UTC [1] LOG: database system is ready to accept connections
lightning-web-1 | Interactive Elixir (1.13.3) - press Ctrl+C to exit (type h() ENTER for help)
lightning-web-1 exited with code 0
Any thoughts on this?
- Added PORT and LIGHTNING_LISTEN_ADDRESS env vars to `runtime.exs`
This causes the container to start without deps and priv/openfn causing it to fail unless the local copy has already been set up. Also on startup try and install the runtime deps (priv/openfn) when the folder can't be found.
- Exclude router.ex and release.ex from code coverage
Added a tip onto README for removing extra local files
Without `runtime.exs` the port binding to `0.0.0.0` doesn't work, causing the docker container instance of the server to be unreachable from outside. Credentials are optional right now for a Job, don't expect one when running a Job. Defaulted a Run's log to `[]`, for some reason I was getting errors when rendering a log should afaik have a log list.
Closes #52
See here for the README changes with Docker instructions.