g
This commit is contained in:
@@ -18,4 +18,25 @@ services:
|
||||
|
||||
backend:
|
||||
image: git.aranroig.com/syndria98/mathew-backend:latest
|
||||
environment:
|
||||
PORT: 5000
|
||||
# The image carries no .env, so without this the backend would try
|
||||
# 127.0.0.1 inside its own container and crash-loop — nginx then
|
||||
# answers every /api/ request with 502.
|
||||
MONGO_URI: mongodb://mongo:27017/mathew
|
||||
# Put JWT_SECRET (and AUTH_TOKEN_TTL if you like) in a .env file next
|
||||
# to this compose file on the server; compose reads it from there.
|
||||
JWT_SECRET: ${JWT_SECRET:-}
|
||||
AUTH_TOKEN_TTL: ${AUTH_TOKEN_TTL:-7d}
|
||||
depends_on:
|
||||
- mongo
|
||||
restart: always
|
||||
|
||||
mongo:
|
||||
image: mongo:7
|
||||
volumes:
|
||||
- mongo-data:/data/db
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
mongo-data:
|
||||
|
||||
Reference in New Issue
Block a user