Skip to content

Commit

Permalink
feat: add postgres DB and mount for test files
Browse files Browse the repository at this point in the history
  • Loading branch information
Julie Rymer committed Apr 23, 2024
1 parent f3cfce0 commit bf6cd2d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
version: '3.8'

services:
db:
image: postgres:latest
ports:
- "5432:5432"
environment:
- POSTGRES_DB=${COMPOSE_PROJECT_NAME}
- POSTGRES_USER=${COMPOSE_PROJECT_NAME}_user
- POSTGRES_PASSWORD=${COMPOSE_PROJECT_NAME}_pwd
volumes:
- postgres:/var/lib/postgresql/data
web:
build: .
ports:
- "8080:8080"
volumes:
- ./src:/app/src
- ./tests:/app/tests
environment:
- ALLOWED_HOSTS=localhost,127.0.0.1,0.0.0.0
- DATABASE_NAME=${COMPOSE_PROJECT_NAME}
- DATABASE_USER=${COMPOSE_PROJECT_NAME}_user
- DATABASE_PASSWORD=${COMPOSE_PROJECT_NAME}_pwd
tty: true

volumes:
postgres:
name: ${COMPOSE_PROJECT_NAME}_postgres

0 comments on commit bf6cd2d

Please sign in to comment.