Make sure it is possible to produce a build that will work with the Docker dev environment
The instructions under https://gitlab.com/delibrium/delibrium-postgrest/-/blob/master/README.md#running-with-docker aren’t currently suitable to produce a development environment. The release build suggested is wildly outdated (May 2020) and there is no way to produce a current build from the repository. There isn’t even a configuration where BASE_API
will become http://localhost:8082/api/
.
Rather than creating a separate environment for the Docker setup, I changed the dev config to use window.location.origin + "/api/"
as the backend rather than hardcoding one. This should be the correct value in any development setup. And I also had to make sure this config is actually used when NODE_ENV=development yarn run build
is executed (currently this script will only produce production builds).
I haven’t adjusted Webpack configuration to consider NODE_ENV
as well (no minification would be nice) but I can do it if desirable.