Parameterize coolify.yml env vars
This commit is contained in:
22
coolify.yml
22
coolify.yml
@@ -2,9 +2,9 @@ apps:
|
||||
- name: gob-alert-postgres
|
||||
image: postgres:15-alpine
|
||||
env:
|
||||
POSTGRES_USER: gob
|
||||
POSTGRES_PASSWORD: gobpass
|
||||
POSTGRES_DB: gob_alert
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
|
||||
- name: gob-alert-redis
|
||||
image: redis:7-alpine
|
||||
@@ -14,9 +14,9 @@ apps:
|
||||
dockerfile: Dockerfile
|
||||
env:
|
||||
- key: DATABASE_URL
|
||||
value: postgres://gob:gobpass@gob-alert-postgres:5432/gob_alert
|
||||
value: ${DATABASE_URL}
|
||||
- key: API_ADMIN_KEY
|
||||
value: changeme
|
||||
value: ${API_ADMIN_KEY}
|
||||
ports:
|
||||
- 3000
|
||||
|
||||
@@ -25,11 +25,15 @@ apps:
|
||||
dockerfile: Dockerfile
|
||||
env:
|
||||
- key: API_URL
|
||||
value: http://gob-alert-api:3000
|
||||
value: ${API_URL}
|
||||
ports:
|
||||
- 3001
|
||||
- 3000
|
||||
|
||||
notes: |
|
||||
This file provides a simple mapping for Coolify to build and deploy services from this repository.
|
||||
Adjust `DATABASE_URL` host when Coolify provides internal network hostnames. Use the Coolify UI
|
||||
to set secrets/variables in the target environment.
|
||||
Set required variables in Coolify (Project → Environment Variables):
|
||||
- POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB
|
||||
- DATABASE_URL (example: postgres://gob:***@gob-alert-postgres:5432/gob_alert)
|
||||
- API_ADMIN_KEY
|
||||
- API_URL (example: http://gob-alert-api:3000)
|
||||
For production, keep the API internal (no public domain) and attach the domain to the web service.
|
||||
|
||||
Reference in New Issue
Block a user