version: "3.9" services: phoenix: # The build parameters for this container. build: # Here we define that it should build from the current directory. context: . environment: # Variables to connect to our Postgres server. PGUSER: postgres PGPASSWORD: postgres PGDATABASE: poex_dev PGPORT: 5432 # Hostname of our Postgres container. PGHOST: pg-master ports: # Mapping the port to make the Phoenix app accessible outside of the container. - "4000:4000" depends_on: # The DB container needs to be started before we start this container. - pg-master pg-master: image: kartoza/postgis:16-3.4 restart: "always" environment: POSTGRES_USER: "postgres" POSTGRES_PASS: "postgres" POSTGRES_MULTIPLE_EXTENSIONS: postgis volumes: - pg-master:/var/lib/postgresql healthcheck: test: "exit 0" volumes: pg-master: