Skip to content

Commit

Permalink
Create docker compose config for api prod
Browse files Browse the repository at this point in the history
also create caddy config
  • Loading branch information
Zuruuh committed Aug 2, 2023
1 parent 5f69b54 commit 2b8a63b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/server/argent-bank.caddy
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
argent-bank.zuruh.sbs {
reverse_proxy localhost:9020
}
31 changes: 31 additions & 0 deletions apps/server/compose.prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: "3"

services:
api:
image: zuruh/argent-bank-api:latest
restart: unless-stopped
build:
context: .
dockerfile: ./docker/server.dockerfile
depends_on:
- database
environment:
SERVER_PORT: 3000
DATABASE_HOST: database
DATABASE_URL: "mongodb://database:/argentbank"
ports:
- "9020:3000"

database:
image: mongo:5.0
restart: unless-stopped
healthcheck:
test: mongo --eval 'db.runCommand("ping").ok' localhost:27017/test --quiet
interval: 1s
retries: 15
start_period: 5s
timeout: 10s
environment:
MONGO_INITDB_DATABASE: argentbank
expose:
- "27017"

0 comments on commit 2b8a63b

Please sign in to comment.