Skip to content

Commit

Permalink
add dockercompose for production
Browse files Browse the repository at this point in the history
  • Loading branch information
Sojabio committed Aug 23, 2024
1 parent 304fc49 commit e6e2c39
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
services:
backend:
platform: linux/x86_64
image: sojabio/wildrent-backend
env_file:
- .env
healthcheck:
test: 'curl --fail --request POST --header ''content-type: application/json'' --url ''http://localhost:4000'' --data ''{"query":"query { __typename }"}'' || exit 1'
interval: 1s
timeout: 2s
retries: 100
depends_on:
db:
condition: service_healthy
frontend:
platform: linux/x86_64
image: sojabio/wildrent-frontend
depends_on:
backend:
condition: service_healthy
healthcheck:
test: "curl --fail --request GET --url 'http://localhost:5173' || exit 1"
interval: 1s
timeout: 2s
retries: 100
db:
image: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -d postgres -U postgres"]
interval: 1s
timeout: 2s
retries: 100
environment:
POSTGRES_PASSWORD: example
adminer:
image: adminer
apigateway:
image: nginx
volumes:
- ./api_gateway/nginx.conf:/etc/nginx/nginx.conf
depends_on:
backend:
condition: service_healthy
frontend:
condition: service_healthy
ports:
- 7000:80

0 comments on commit e6e2c39

Please sign in to comment.