-
Notifications
You must be signed in to change notification settings - Fork 1
/
Acornfile
58 lines (54 loc) · 1.34 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
name: "Mern Stack Acorn"
description: "Acorn running a simple MERN stack app"
readme: "./README.md"
icon: "./mern.png"
args: {
mongodbname: "mongodb"
}
services: db: {
image: "ghcr.io/acorn-io/mongodb:v6.0-2"
serviceArgs: {
dbName: args.mongodbname
}
}
containers: {
server: {
build: {
context: "./server"
dockerfile: "./server/Dockerfile"
}
dirs: "/usr/src/app": "./server"
ports: publish: "5050:5050/http"
if args.dev{
dirs: {
"/usr/src/app": "./server"
}
}
env: {
DB_HOST: "@{service.db.address}"
DB_PORT: "@{service.db.port.27017}"
DB_NAME: "@{service.db.data.dbName}"
DB_USER: "@{service.db.secrets.admin.username}"
DB_PASS: "@{service.db.secrets.admin.password}"
}
consumes: ["db"]
}
client: {
build: {
context: "./client"
dockerfile: "./client/Dockerfile"
}
memory: 1536Mi
dirs: "/usr/src/app": "./client"
ports: publish: "3000:3000/http"
env: {
REACT_APP_SERVER_HOST: "@{services.server.endpoint}"
}
if args.dev{
dirs: {
"/usr/src/app": "./client"
}
}
dependsOn: ["server"]
}
}