Build an MVP with Elixir

Hey there. Sorry about that! Could you try this link please? It “should” run, at least I just tested it:

https://blogcash.app

Hey there. Sorry about that! Could you try this link please? It “should” run, at least I just tested it:

https://blogcash.app

1 Like

Thank you very much. It works

its much faster to use Testcontainers for the postgres database and other external services, instead of using docker compose, for running tests. Plus you get automatic repeatability in GitHub actions and other CIs with docker installed.

I am planning on finding a way to conditionally include the piece of code in compile time, with a macro, if its possible, but right now the way start a postgres is to add approximately 1 line in application.ex:

  @impl true
  def start(_type, _args) do
    if Mix.env() == :test, do: {:ok, _container} = Testcontainers.Ecto.postgres_container(app: :hello)
    #....
  end

When compiling for release you will get a warning that the Testcontainers.Ecto.postgres_container is not a function that exists, if you scope the dependency with [:dev, :test]. If you would run a released version in test mode the application will crash and fail to start.

If you reboot your computer with this setup and want to work on a couple of tests, you can just go ahead and work until your tests pass. Then if you want to test the application you can start worry about your docker compose :wink:

The function Testcontainers.Ecto.postgres_container overrides the repo config for the test session to set the port, user, pass and database.

PS! I have been planning on adding support for mapping data volume to a relative folder in the project, which will enable using the function also for dev mode. EDIT: propably volumes

2 Likes

Hi,
One more thing: are the videos subtitled?
I reassure you, your English, however, seems easy to understand.

Sadly no. I couldn’t find a good service that would auto-subtitle it for me and I don’t think Gumroad can show subtitles anyways :thinking: but I’m working on something that will hopefully solve all these issues pretty soon :wink:yellowspaceship.com

3 Likes

Is there an issue here, or do you just find doing it this way easier for yourself?

I am looking at buying this course, and to me getting a good explanation of how to do it with docker compose adds value.

Not an issue. A suggestion to course maker. And/or advanced tip after finishing course. Not affiliated. Choose to ignore if you want to learn with Docker Compose, and/or havent finished course in its current form.

1 Like

Thanks, I want to try both ways.

1 Like

For Black Friday, I offer the course at 50% less!

Check it out here (the link contains the coupon code BLACKFRIDAY2023)

3 Likes

Thanks for the discount - things are tight right now and a recent tech assessment exposed a lot of areas that need some attention :slight_smile:

Just an FYI that I launched my own video course platform at indiecourses.com and dropped the price of this course by 50% as a launch promotion!

You can find the course here:

2 Likes

Congrats on the launch. That’s a pretty great offer will be checking it out.

1 Like

Thanks Ben! I’m glad you like the video course :slight_smile:

1 Like