-
Notifications
You must be signed in to change notification settings - Fork 0
/
architect.yml
61 lines (59 loc) · 1.54 KB
/
architect.yml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: node-rest-api
description: A simple sign in REST API built with Node.js, Express, and a postgres database.
homepage: https://github.com/architect-templates/node-rest-api
keywords:
- architect
- examples
- stateful
- postgres
- nodejs
- reactjs
secrets:
db_user:
description: Root user to assign to the component's DB
default: architect
db_pass:
description: Root password to assign to the component's DB
default: secret
db_name:
description: Name of the DB the component will store content in
default: api-db
db_port:
description: Port for the db
default: 5432
api_port:
description: Port for api
default: 8080
services:
api-db:
image: postgres:12
interfaces:
database:
port: ${{ secrets.db_port }}
protocol: postgresql
environment:
POSTGRES_USER: ${{ secrets.db_user }}
POSTGRES_PASSWORD: ${{ secrets.db_pass }}
POSTGRES_DB: ${{ secrets.db_name }}
api:
build:
context: .
interfaces:
main:
port: ${{ secrets.api_port }}
ingress:
subdomain: api
environment:
DB_ADDR: ${{ services.api-db.interfaces.database.url }}/${{ secrets.db_name }}
DB_USER: ${{ secrets.db_user }}
DB_PASS: ${{ secrets.db_pass }}
PORT: ${{ secrets.api_port }}
debug:
command: npm run dev
build:
args:
NODE_ENV: development
volumes:
src:
mount_path: /usr/src/app/src
host_path: ./src