Skip to content

Commit

Permalink
Working docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
harshsinghvi committed Nov 17, 2023
1 parent c9a08d7 commit fca1dc1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ kubectl rollout restart deployment/name # to update image
kubectl get ingress # ingress exposed url
kubectl port-forward statefulset.apps/postgres 5432:5432
kubectl exec --stdin --tty pod/postgres-0 -- /bin/bash
kubectl logs -f pod/go-todo-api-5587558c9b-zhb75 -c check-db-ready

psql -h localhost -p 5432 -d postgres -U postgres

aws eks update-kubeconfig --region ap-south-1 --name cluster
```

Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ services:
- 8080:8080
restart: on-failure
depends_on:
- postgres
- postgres
networks:
- fullstack
environment:
- DB_HOST=${DB_HOST}
- DB_HOST=postgres
- DB_DRIVER=${DB_DRIVER}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
Expand All @@ -23,17 +23,17 @@ services:
postgres:
image: postgres:latest
container_name: postgres
hostname: postgres
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
- DATABASE_HOST=${DB_HOST}
ports:
- 5432:5432
volumes:
- ./docker-compose/postgres:/var/lib/postgresql
- ./docker-compose/postgres:/var/lib/postgresql/data
networks:
- fullstack
- fullstack

# Networks to be created to facilitate communication between containers
networks:
Expand Down

0 comments on commit fca1dc1

Please sign in to comment.