Writing the CommandStack container

Inside the command_db directory, we'll define the Dockerfile for the CommandStack container. The Dockerfile has environment variables, and the initial file responsible for creating the databases. Look at the following file content:

FROM postgres 
 
ENV POSTGRES_USER=postgres 
ENV POSTGRES_PASSWORD=postgres 
 
# run create.sql on init 
ADD create.sql /docker-entrypoint-initdb.d 

Get Microservice Patterns and Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.