Repository navigation
Expand file tree
/
Copy pathzerops.yml
More file actions
114 lines (113 loc) · 4.79 KB
/
Copy pathzerops.yml
File metadata and controls
114 lines (113 loc) · 4.79 KB
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
zerops:
- setup: medusa
build:
envVariables:
BACKEND_URL: ${MEDUSA_INSTANCE_URL}
NX_DAEMON: false
base: nodejs@24
buildCommands:
- bash ./scripts/build-medusa.sh
# Move prod node_modules to apps/medusa-be (equivalent to Docker's COPY --from=build)
- mv medusa-be-prod/node_modules apps/medusa-be/
deployFiles:
- apps/medusa-be/.medusa/server/~
- apps/medusa-be/~node_modules
- apps/medusa-be/src/scripts/seed-files
- apps/medusa-be/src/scripts
- apps/medusa-be/tsconfig.json
cache:
- node_modules
deploy:
readinessCheck:
httpGet:
port: 9000
path: /health
run:
base: nodejs@24
envVariables:
DATABASE_TYPE: postgres
NODE_ENV: production
BACKEND_URL: ${MEDUSA_INSTANCE_URL}
STORE_CORS: ${NEXT_STORE_URL},${NEXT_STORE_DEMO_URL},${ANALOG_STORE_URL},https://demo-13d1-3000.prg1.zerops.app,https://wr-demo.netlify.app,https://n1-fe.netlify.app,http://localhost:5173,http://localhost:3000,http://localhost:3001,http://localhost:3002,http://localhost:3003
ADMIN_CORS: ${NEXT_STORE_URL},${NEXT_STORE_DEMO_URL},${ANALOG_STORE_URL},https://demo-13d1-3000.prg1.zerops.app,https://wr-demo.netlify.app,https://n1-fe.netlify.app,http://localhost:5173,http://localhost:3000,http://localhost:3001,http://localhost:3002,http://localhost:3003
AUTH_CORS: ${NEXT_STORE_URL},${NEXT_STORE_DEMO_URL},${ANALOG_STORE_URL},https://demo-13d1-3000.prg1.zerops.app,https://wr-demo.netlify.app,https://n1-fe.netlify.app,http://localhost:5173,http://localhost:3000,http://localhost:3001,http://localhost:3002,http://localhost:3003
DATABASE_URL: postgresql://${db_user}:${db_password}@${db_hostname}:5432/${db_hostname}?sslmode=disable
MINIO_BUCKET: ${storage_bucketName}
MINIO_ENDPOINT: ${storage_apiUrl}
MINIO_SECRET_KEY: ${storage_secretAccessKey}
MINIO_ACCESS_KEY: ${storage_accessKeyId}
FILE_PROVIDER: s3
FILE_LOCAL_UPLOAD_DIR: /tmp/medusa-be-files
REDIS_URL: redis://${redis_hostname}:6379
REDIS_SESSIONS_ENABLED: "1"
CACHE_PROVIDER: redis
EVENT_BUS_PROVIDER: redis
WORKFLOW_ENGINE_PROVIDER: redis
LOCKING_PROVIDER: redis
MEILISEARCH_ENABLED: "1"
MEILISEARCH_HOST: http://${search_hostname}:${search_port}
MEILISEARCH_API_KEY: ${search_masterKey}
SENTRY_DSN: ${MEDUSA_SENTRY_DSN}
SENTRY_NAME: ${MEDUSA_SENTRY_NAME}
initCommands:
# with each deploy
- zsc execOnce ${appVersionId}_migration -- npm run migrateProd
# initial setup, happens once in service lifetime
- zsc execOnce createInitialSuperadmin -- npm run createInitialSuperadmin
# - zsc execOnce seedInitialData -- npm run seedInitialData
- zsc execOnce setInitialPublishableKey -- npm run setInitialPublishableKeyZerops
#- zsc execOnce addInitialSearchDocuments -- npm run addInitialSearchDocuments
ports:
- port: 9000
httpSupport: true
start: npm start
healthCheck:
httpGet:
port: 9000
path: /health
- setup: demo
build:
base: nodejs@24
envVariables:
RESEND_FROM_EMAIL: ${RESEND_FROM_EMAIL}
CONTACT_EMAIL: ${CONTACT_EMAIL}
NEXT_PUBLIC_MEDUSA_BACKEND_URL: ${medusa_zeropsSubdomain}
NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY: ${medusa_CHANNEL_PUBLISHABLE_KEY}
NX_DAEMON: false
buildCommands:
# Remove everything in apps except medusa-be via regex
- |
shopt -s extglob
rm -rf apps/!(frontend-demo)
- pnpm i
- if [ "${SKIP_NX_BOUNDARIES:-}" != "1" ]; then pnpm lint:nx; fi
- node_modules/.bin/nubx --node nx run frontend-demo:build --skip-nx-cache --verbose
- rm -rf apps/frontend-demo/node_modules
- pnpm --filter=frontend-demo --prod deploy frontend-demo-temp-deploy
- mv frontend-demo-temp-deploy/node_modules apps/frontend-demo/
deployFiles:
- .nx
- nx.json
- package.json
- pnpm-lock.yaml
- pnpm-workspace.yaml
- node_modules
- apps/frontend-demo/scripts
- apps/frontend-demo/package.json
- apps/frontend-demo/.next
- apps/frontend-demo/next.config.js
- apps/frontend-demo/node_modules
- apps/frontend-demo/public
cache: node_modules
run:
base: nodejs@24
start: npm run start:fe-demo
ports:
- port: 3000
httpSupport: true
envVariables:
RESEND_FROM_EMAIL: ${RESEND_FROM_EMAIL}
CONTACT_EMAIL: ${CONTACT_EMAIL}
NEXT_PUBLIC_MEDUSA_BACKEND_URL: ${medusa_zeropsSubdomain}
NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY: ${medusa_CHANNEL_PUBLISHABLE_KEY}
CI: true