Skip to content

Commit

Permalink
Included postgres into docker config
Browse files Browse the repository at this point in the history
  • Loading branch information
pachecoio committed Nov 20, 2021
1 parent 98b91c3 commit 756944a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DB_USER=postgres
DB_PASSWORD=root
DB_NAME=go-todo-db
21 changes: 21 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,33 @@ services:
target: dev
volumes:
- .:/app
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
ports:
- "5000:5000"
- "2345:2345"
networks:
- go-todo-network

go-todo-db:
container_name: go-todo-db
image: postgres
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
volumes:
- postgres-db:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- go-todo-network

volumes:
postgres-db:

networks:
go-todo-network:
name: go-todo-network

0 comments on commit 756944a

Please sign in to comment.