Skip to content

Commit

Permalink
ci: set all environemnt compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Aug 12, 2024
1 parent 1079926 commit 54facce
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 73 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,9 @@ Temporary Items
# Local
dist
/.env
/.env.*.local
/.env.*
*._local.ts

# Migrations
/db/migrations/*-migration.ts
/db
/db
File renamed without changes.
17 changes: 17 additions & 0 deletions compose.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: nestjs_dev

services:
app:
env_file:
- .env.dev

db:
env_file:
- .env.dev

redis:
env_file:
- .env.dev
nginx:
ports:
- 5000:80
4 changes: 4 additions & 0 deletions compose.override.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
services:
nginx:
ports:
- 5000:80
17 changes: 17 additions & 0 deletions compose.prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: nestjs_prod

services:
app:
env_file:
- .env.prod

db:
env_file:
- .env.prod

redis:
env_file:
- .env.prod
nginx:
ports:
- 5002:80
17 changes: 17 additions & 0 deletions compose.staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: nestjs_staging

services:
app:
env_file:
- .env.staging

db:
env_file:
- .env.staging

redis:
env_file:
- .env.staging
nginx:
ports:
- 5001:80
8 changes: 3 additions & 5 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ services:
redis:
condition: service_healthy
healthcheck:
test: "wget -qO- http://app:5000"
interval: 5s
timeout: 5s
test: "wget -qO- http://app:${PORT}"
interval: 10s
timeout: 10s
retries: 3

db:
Expand Down Expand Up @@ -49,8 +49,6 @@ services:

nginx:
image: nginx:alpine
ports:
- 5000:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
Expand Down
33 changes: 0 additions & 33 deletions docker-compose.prod.yml

This file was deleted.

33 changes: 0 additions & 33 deletions docker-compose.staging.yml

This file was deleted.

0 comments on commit 54facce

Please sign in to comment.