Set an explicit username/password for Postgres in the swarm and k8s files too

This commit is contained in:
Peter Valdez 2020-02-19 14:54:19 -05:00
parent 7d1e4a982d
commit e8e002bb23
5 changed files with 19 additions and 1 deletions

View File

@ -16,6 +16,9 @@ services:
condition: on-failure condition: on-failure
db: db:
image: postgres:9.4 image: postgres:9.4
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
volumes: volumes:
- db-data:/var/lib/postgresql/data - db-data:/var/lib/postgresql/data
networks: networks:

View File

@ -14,6 +14,9 @@ services:
condition: on-failure condition: on-failure
db: db:
image: postgres:9.4 image: postgres:9.4
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
volumes: volumes:
- db-data:/var/lib/postgresql/data - db-data:/var/lib/postgresql/data
networks: networks:

View File

@ -18,6 +18,11 @@ spec:
containers: containers:
- image: postgres:9.4 - image: postgres:9.4
name: postgres name: postgres
env:
- name: POSTGRES_USER
value: postgres
- name: POSTGRES_PASSWORD
value: postgres
ports: ports:
- containerPort: 5432 - containerPort: 5432
name: postgres name: postgres

View File

@ -77,6 +77,10 @@ spec:
env: env:
- name: PGDATA - name: PGDATA
value: /var/lib/postgresql/data/pgdata value: /var/lib/postgresql/data/pgdata
- name: POSTGRES_USER
value: postgres
- name: POSTGRES_PASSWORD
value: postgres
ports: ports:
- containerPort: 5432 - containerPort: 5432
name: db name: db

View File

@ -47,6 +47,9 @@ services:
db: db:
image: postgres:9.4 image: postgres:9.4
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
volumes: volumes:
- "db-data:/var/lib/postgresql/data" - "db-data:/var/lib/postgresql/data"
networks: networks: