Skip to content

Commit

Permalink
feat: prod docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin-Frost committed May 6, 2024
1 parent 9fc9c53 commit 89c254f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DB_HOST='localhost'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Development

```sh
docker compose up
docker compose -f docker-compose.dev.yml up
pnpm install
pnpm start:dev
```
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml → docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: aec-2024-skill08-s3
name: aec-2024-skill08-s3-dev

services:
postgres:
Expand Down
31 changes: 31 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: aec-2024-skill08-s3-prod

services:
postgres:
image: postgres:latest
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 5s
retries: 5
ports:
- 5432:5432
volumes:
- pg_data:/var/lib/postgresql/data

api:
image: ghcr.io/blz-it/aec-2024-skill08-s3-api:main
environment:
DB_HOST: postgres
ports:
- 3000:3000
depends_on:
postgres:
condition: service_healthy

volumes:
pg_data:

0 comments on commit 89c254f

Please sign in to comment.