forked from Humanitec-DemoOrg/ephemeral-env-demo
/
score.yaml
37 lines (33 loc) · 999 Bytes
/
score.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
apiVersion: score.dev/v1b1
metadata:
name: hello-world
# Define the ports that this service exposes
service:
ports:
www:
port: 80 # The port that the service will be exposed on
targetPort: 3000 # The port that the container will be listening on
# Define the containers that make up this service
containers:
frontend:
image: registry.humanitec.io/public/sample-score-app:latest
variables:
MESSAGE: "Hello World!"
PORT: "3000"
DB_DATABASE: ${resources.db.name}
DB_USER: ${resources.db.username}
DB_PASSWORD: ${resources.db.password}
DB_HOST: ${resources.db.host}
DB_PORT: ${resources.db.port}
# Define the resources that this service needs
resources:
dns: # We need a DNS record to point to the service
type: dns
route: # We need a route attach to the DNS record
type: route
params:
host: ${resources.dns.host}
path: /
port: 80
db: # We need a database to store data
type: postgres