mirror of
https://github.com/directus/directus.git
synced 2026-02-01 01:45:27 -05:00
Merge pull request #3693 from directus/action-retries
Add retries for npm install build step
This commit is contained in:
4
.github/actions/Makefile
vendored
4
.github/actions/Makefile
vendored
@@ -1,10 +1,10 @@
|
||||
SHELL=bash
|
||||
|
||||
version=v9.0.0-beta.1
|
||||
version=latest
|
||||
tag=$(version)
|
||||
cmd=
|
||||
user=directus
|
||||
registry=ghcr.io
|
||||
registry=docker.io
|
||||
repository=directus/directus
|
||||
|
||||
.PHONY: build
|
||||
|
||||
@@ -9,14 +9,15 @@ ARG VERSION
|
||||
RUN \
|
||||
apk update && \
|
||||
apk upgrade && \
|
||||
apk add jq
|
||||
apk add bash
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
WORKDIR /directus
|
||||
|
||||
COPY package.json .
|
||||
RUN \
|
||||
jq ".dependencies.directus = \"^${VERSION}\"" package.json > updated.json && \
|
||||
mv updated.json package.json
|
||||
|
||||
RUN for i in {1..60}; do npm install "directus@${VERSION}" && break || sleep 30; done
|
||||
|
||||
RUN cat package.json
|
||||
|
||||
@@ -74,6 +75,9 @@ RUN npm install
|
||||
|
||||
# Copy files
|
||||
COPY ./rootfs /
|
||||
# Keep the updated package.json
|
||||
COPY --from=builder /directus/package.json .
|
||||
|
||||
RUN chmod +x /usr/bin/entrypoint && chmod +x /usr/bin/print
|
||||
|
||||
# Create directories
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
version: "3"
|
||||
services:
|
||||
database:
|
||||
image: postgres:12
|
||||
networks:
|
||||
- "directus"
|
||||
environment:
|
||||
POSTGRES_DB: "directus"
|
||||
POSTGRES_USER: "directus"
|
||||
POSTGRES_PASSWORD: "directus"
|
||||
|
||||
directus:
|
||||
build:
|
||||
context: "../"
|
||||
args:
|
||||
VERSION: "v9.0.0-rc.5"
|
||||
REPOSITORY: "directus/directus"
|
||||
ports:
|
||||
- 8055:8055
|
||||
networks:
|
||||
- "directus"
|
||||
environment:
|
||||
KEY: mykey
|
||||
SECRET: mysecret
|
||||
DB_CLIENT: "pg"
|
||||
DB_HOST: "database"
|
||||
DB_PORT: "5432"
|
||||
DB_USER: "directus"
|
||||
DB_PASSWORD: "directus"
|
||||
DB_DATABASE: "directus"
|
||||
|
||||
networks:
|
||||
directus:
|
||||
@@ -1,22 +1,21 @@
|
||||
{
|
||||
"name": "directus-project",
|
||||
"version": "1.0.0",
|
||||
"description": "Directus Project",
|
||||
"main": "index.js",
|
||||
"scripts": {},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@keyv/redis": "^2.1.2",
|
||||
"directus": "^9.0.0-beta.1",
|
||||
"ioredis": "^4.17.3",
|
||||
"memcached": "^2.2.2",
|
||||
"mssql": "^6.2.2",
|
||||
"mysql": "^2.18.1",
|
||||
"oracledb": "^5.0.0",
|
||||
"pg": "^8.3.3",
|
||||
"sqlite3": "^5.0.0",
|
||||
"yargs": "^16.0.3"
|
||||
}
|
||||
"name": "directus-project",
|
||||
"version": "1.0.0",
|
||||
"description": "Directus Project",
|
||||
"main": "index.js",
|
||||
"scripts": {},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@keyv/redis": "^2.1.2",
|
||||
"ioredis": "^4.17.3",
|
||||
"memcached": "^2.2.2",
|
||||
"mssql": "^6.2.2",
|
||||
"mysql": "^2.18.1",
|
||||
"oracledb": "^5.0.0",
|
||||
"pg": "^8.3.3",
|
||||
"sqlite3": "^5.0.0",
|
||||
"yargs": "^16.0.3"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user