Skip to content

Commit

Permalink
refactor: Changes containers names and persist db volume
Browse files Browse the repository at this point in the history
  • Loading branch information
ruiconti committed Mar 24, 2021
1 parent e748feb commit f61a37e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ __pycache__/
management/
management.py
tests/resources/
db-pgdata/

# Elastic Beanstalk Files
.elasticbeanstalk/
Expand Down
10 changes: 8 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ x-common-variables: &common-variables

services:
dbpg:
container_name: postgres
container_name: ${PROJECT_NAME}_postgres
image: postgres
environment:
<<: *common-variables
PGDATA: /data/postgres
ports:
- "5432:5432"
volumes:
- ./db-pgdata:/var/lib/postgresql/data/pgdata
networks:
- backend
restart: unless-stopped
Expand All @@ -22,9 +24,10 @@ services:
environment:
<<: *common-variables
POSTGRES_HOST: dbpg
MAX_CONCURRENCY: 8
MAX_CONCURRENCY: 1
HOST: "0.0.0.0"
PORT: "5000"
container_name: ${PROJECT_NAME}_web
image: kms:test
build:
context: .
Expand All @@ -45,3 +48,6 @@ services:
networks:
backend:
driver: bridge

volumes:
db-pgdata:

0 comments on commit f61a37e

Please sign in to comment.