-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Acornfile
130 lines (126 loc) · 3.16 KB
/
Acornfile
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
args: {
logLevel: "info"
statisticsChannels: ""
apnsEnvironment: "production"
}
profiles: {
dev: {
logLevel: "debug"
apnsEnvironment: "sandbox"
}
}
containers: {
server: {
build: {
context: "."
}
dependsOn: ["db", "redis"]
ports: publish: "80/http"
command: [
"serve",
"--env",
"production",
"--hostname",
"0.0.0.0",
"--port",
"80",
"--auto-migrate"
]
env: {
LOG_LEVEL: args.logLevel
REDIS_URL: "redis://redis:6379"
DATABASE_URL: "secret://db-url/template"
SENDGRID_API_KEY: "secret://sendgrid/api-key"
APNS_KEY_ID: "secret://apns/key-id"
APNS_TEAM_ID: "secret://apns/team-id"
APNS_ENVIRONMENT: args.apnsEnvironment
APNS_KEY_PATH: "/app/private/AuthKey.p8"
STATISTICS_CHANNELS: args.statisticsChannels
}
dirs: {
"/app/private/": "secret://apns"
}
}
queues: {
build: containers.server.build
env: containers.server.env
dependsOn: containers.server.dependsOn + ["server"]
command: ["queues"]
dirs: containers.server.dirs
}
"queues-scheduled": {
build: containers.server.build
env: containers.server.env
dependsOn: containers.server.dependsOn + ["server"]
command: ["queues", "--scheduled"]
dirs: containers.server.dirs
}
db: {
image: "postgres:alpine"
ports: "5432/tcp"
env: {
PGDATA: "/var/lib/postgresql/data/pgdata"
POSTGRES_DB: "secret://pg-db/token"
POSTGRES_USER: "secret://pg-user/token"
POSTGRES_PASSWORD: "secret://pg-password/token"
}
dirs: {
"/var/lib/postgresql/data/pgdata": "volume://puffery-db"
}
}
redis: {
image: "redis:alpine"
ports: "6379/tcp"
dirs: {
"/data": "volume://puffery-redis"
}
command: [ "redis-server", "--appendonly", "yes" ]
}
inbound: {
image: "ghcr.io/vknabel/puffery-sendgrid-inbound-middleware/puffery-sendgrid-inbound-middleware:latest-nightly-14"
dependsOn: ["server"]
ports: publish: "3000/http"
env: {
PUFFERY_NOTIFY_ADDRESS: "http://server/api/v1/notify-inbound-email"
}
}
}
volumes: {
"puffery-redis": {
accessModes: "readWriteOnce"
}
"puffery-db": {
accessModes: "readWriteOnce"
}
}
secrets: {
"pg-user": {
type: "token"
}
"pg-password": {
type: "token"
}
"pg-db": {
type: "token"
}
"db-url": {
type: "template"
data: {
template: "postgres://${secret://pg-user/token}:${secret://pg-password/token}@db:5432/${secret://pg-db/token}"
}
}
sendgrid: {
type: "opaque"
data: {
"api-key": ""
}
}
apns: {
type: "opaque"
data: {
"key-id": ""
"team-id": ""
"AuthKey.p8": ""
}
}
}