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
db:
image: postgres:9.4
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
volumes:
- db-data:/var/lib/postgresql/data
networks:
@ -78,4 +81,4 @@ networks:
backend:
volumes:
db-data:
db-data:

View File

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

View File

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

View File

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

View File

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