skip to Main Content

Postgres Docker image sometimes fail to start

I'm working on a Python project which uses Docker Compose with a Postgres service. compose/postgresql/Dockerfile: FROM postgres:16.1-bullseye COPY init.sql /docker-entrypoint-initdb.d/init.sql compose/postgresql/init.sql: (basic account setup) -- Create database & user CREATE DATABASE ${POSTGRES_DB}; CREATE USER ${POSTGRES_USER} WITH ENCRYPTED PASSWORD ${POSTGRES_PASSWORD}; --…

VIEW QUESTION

PostgreSQL window function for sum per interval

The table is represented by following scripts: CREATE TABLE sales ( id SERIAL PRIMARY KEY, product_id INTEGER, sales_date DATE, quantity INTEGER, price NUMERIC ); INSERT INTO sales (product_id, sales_date, quantity, price) VALUES (1, '2023-01-01', 10, 10.00), (1, '2023-01-02', 12, 12.00),…

VIEW QUESTION
Back To Top
Search