Developer Advocate
Technologist focusing on cloud-native technologies, DevOps, CI/CD pipelines, and system observability. His focus revolves around creating technical content, delivering talks, and engaging with developer communities to promote the adoption of modern software practices. With a strong background in software, he has worked extensively with the JVM, applying his expertise across various industries. In addition to his technical work, he is the author of several books and regularly shares insights through his blog and open-source contributions.
Markdown supported · ⌘↵ to post
Great article! I had my look on APISIX for some time and didn't know about PostgREST.
Btw. perhaps your could revisit your Dockerfile and add the apt-get layer after the FROM otherwise you will have to redownload the apt dependencies on every build for every change. Also WORKDIR will create the directory if it doesn't exist.
FROM debian:bookworm-slim #1
RUN apt-get update && \
apt-get install -y libpq-dev xz-utils
ARG POSTGREST_VERSION=v10.1.1 #2
ARG POSTGREST_FILE=postgrest-$POSTGREST_VERSION-linux-static-x64.tar.xz #2
WORKDIR postgrest
ADD github.com/PostgREST/postgrest/releases/download$POSTGREST_VERSION/$POSTGREST_FILE \
. #3
RUN tar xvf $POSTGREST_FILE && \
rm $POSTGREST_FILE #4
Federico Kereki
This is an interesting idea, but having an API based on physical tables instead of logical entities is considered an antipattern. For instance here at it reads: A resource doesn't have to be based on a single physical data item. For example, an order resource might be implemented internally as several tables in a relational database, but presented to the client as a single entity. Avoid creating APIs that simply mirror the internal structure of a database. The purpose of REST is to model entities and the operations that an application can perform on those entities. A client should not be exposed to the internal implementation.