-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzerops.yml
163 lines (163 loc) · 6.38 KB
/
zerops.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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
storefront:
build:
base: [nodejs@16]
prepare:
- npm install -g [email protected]
build:
- |
cd react-storefront
pnpm install --frozen-lockfile
pnpm run generate
pnpm run build:storefront
deploy:
- react-storefront/apps/storefront/~/dist
- react-storefront/apps/storefront/~/.next
- react-storefront/apps/storefront/~/build
- react-storefront/apps/storefront/~/content/locales
- react-storefront/apps/storefront/~/content/compiled-locales
cache: [react-storefront/.turbo]
run:
start: pnpm turbo start
checkout:
build:
base: [nodejs@16]
prepare:
- npm install -g [email protected]
build:
- |
cd react-storefront
pnpm install --frozen-lockfile
pnpm run build:saleor-app-checkout
deploy:
- react-storefront/apps/saleor-app-checkout/~/dist
- react-storefront/apps/saleor-app-checkout/~/.next
- react-storefront/apps/saleor-app-checkout/~/build
- react-storefront/apps/saleor-app-checkout/~/content/locales
- react-storefront/apps/saleor-app-checkout/~/content/compiled-locales
cache: [react-storefront/.turbo]
run:
start: pnpm turbo start
dashboard:
build:
base: [nodejs@14]
build:
- |
cd saleor-dashboard
npm install --frozen-lockfile --omit=dev
npm run build
deploy: [saleor-dashboard/build/dashboard/~/]
cache: [saleor-dashboard/node_modules]
run:
start: npm start
api:
build:
base: [go@1]
prepare:
- apt update
- apt install docker docker-compose -y
- sudo systemctl enable docker.service
- sudo systemctl enable containerd.service
- sudo systemctl start docker
build:
- if [ -f "saleor-build-images.tar.gz" ]; then docker load -i saleor-build-images.tar.gz; fi
- docker build --progress=plain --network=host --cache-from=saleor:build-python --cache-from=python:3.9 --target=build-python -t saleor:build-python saleor/.
- docker build --progress=plain --network=host --cache-from=saleor:runtime --cache-from=saleor:build-python --cache-from=python:3.9-slim --build-arg STATIC_URL=$STATIC_URL -t saleor:runtime saleor/.
- docker save python saleor | pigz > saleor-build-images.tar.gz
- docker save saleor:runtime | pigz > saleor-runtime-image.tar.gz
- docker system prune -af
deploy: [docker-compose.yml, saleor-runtime-image.tar.gz, saleor/~/saleor/, saleor/~/templates/]
cache: [saleor-build-images.tar.gz]
run:
prepare:
- apt update
- apt install docker docker-compose -y
- sudo systemctl enable docker.service
- sudo systemctl enable containerd.service
- sudo systemctl start docker
init:
- if [[ "$(docker images -q saleor:runtime 2> /dev/null)" == "" ]]; then docker load -i saleor-runtime-image.tar.gz; fi
- docker-compose run --rm api "python manage.py migrate" || true
- if [ ! -f initialized.txt ]; then docker-compose run --rm api "python manage.py createsuperuser --superuser_password=$SUPER_USER_PASSWORD"; touch initialized.txt; fi
start: docker-compose up api
worker:
build:
base: [go@1]
prepare:
- apt update
- apt install docker docker-compose -y
- sudo systemctl enable docker.service
- sudo systemctl enable containerd.service
- sudo systemctl start docker
build:
- if [ -f "saleor-build-images.tar.gz" ]; then docker load -i saleor-build-images.tar.gz; fi
- docker build --progress=plain --network=host --cache-from=saleor:build-python --cache-from=python:3.9 --target=build-python -t saleor:build-python saleor/.
- docker build --progress=plain --network=host --cache-from=saleor:runtime --cache-from=saleor:build-python --cache-from=python:3.9-slim --build-arg STATIC_URL=$STATIC_URL -t saleor:runtime saleor/.
- docker save python saleor | pigz > saleor-build-images.tar.gz
- docker save saleor:runtime | pigz > saleor-runtime-image.tar.gz
- docker system prune -af
deploy: [docker-compose.yml, saleor-runtime-image.tar.gz, saleor/~/saleor/, saleor/~/templates/]
cache: [saleor-build-images.tar.gz]
run:
prepare:
- apt update
- apt install docker docker-compose -y
- sudo systemctl enable docker.service
- sudo systemctl enable containerd.service
- sudo systemctl start docker
init:
- if [[ "$(docker images -q saleor:runtime 2> /dev/null)" == "" ]]; then docker load -i saleor-runtime-image.tar.gz; fi
start: docker-compose up worker
mailhog:
build:
base: [go@1]
prepare:
- apt update
- apt install docker docker-compose -y
- sudo systemctl enable docker.service
- sudo systemctl enable containerd.service
- sudo systemctl start docker
build:
- |
if [ -f "mailhog-image.tar.gz" ]; then exit 0; fi
docker pull mailhog/mailhog:latest
docker save mailhog/mailhog:latest | pigz > mailhog-image.tar.gz
docker system prune -af
deploy: [docker-compose.yml, mailhog-image.tar.gz]
cache: [docker-compose.yml, mailhog-image.tar.gz]
run:
prepare:
- apt update
- apt install docker docker-compose -y
- sudo systemctl enable docker.service
- sudo systemctl enable containerd.service
- sudo systemctl start docker
init:
- if [[ "$(docker images -q mailhog/mailhog:latest 2> /dev/null)" == "" ]]; then docker load -i mailhog-image.tar.gz; fi
start: docker-compose up mailhog
jaeger:
build:
base: [go@1]
prepare:
- apt update
- apt install docker docker-compose -y
- sudo systemctl enable docker.service
- sudo systemctl enable containerd.service
- sudo systemctl start docker
build:
- |
if [ -f "jaeger-image.tar.gz" ]; then exit 0; fi
docker pull jaegertracing/all-in-one:latest
docker save jaegertracing/all-in-one:latest | pigz > jaeger-image.tar.gz
docker system prune -af
deploy: [docker-compose.yml, jaeger-image.tar.gz]
cache: [docker-compose.yml, jaeger-image.tar.gz]
run:
prepare:
- apt update
- apt install docker docker-compose -y
- sudo systemctl enable docker.service
- sudo systemctl enable containerd.service
- sudo systemctl start docker
init:
- if [[ "$(docker images -q jaegertracing/all-in-one:latest 2> /dev/null)" == "" ]]; then docker load -i jaeger-image.tar.gz; fi
start: docker-compose up jaeger