Skip to content

Commit 0630d90

Browse files
authored
Small fixes to the project setup (#712)
* feat: add minio-data to gitignore * feat: add current nvmrc to github action for deployment * fix: add missing quotes to env example * fix: remove spaces?
1 parent 5d339b6 commit 0630d90

File tree

5 files changed

+19
-9
lines changed

5 files changed

+19
-9
lines changed

.env.example

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ SMTP_SECURE = "false"
3232
SMTP_USERNAME = "ignored"
3333
SMTP_PASSWORD = "ignored"
3434

35-
S3_ENDPOINT=http://localhost:9000
36-
S3_REGION=eu-norht-1
37-
S3_BUCKET=device-images
38-
S3_ACCESS_KEY=minioadmin
39-
S3_SECRET_KEY=minioadmin123
40-
S3_PUBLIC_URL=http://localhost:9000/device-images
35+
S3_ENDPOINT="http://localhost:9000"
36+
S3_REGION="eu-north-1"
37+
S3_BUCKET="device-images"
38+
S3_ACCESS_KEY="minioadmin"
39+
S3_SECRET_KEY="minioadmin123"
40+
S3_PUBLIC_URL="http://localhost:9000/device-images"

.github/workflows/deploy.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ jobs:
131131
with:
132132
images: ghcr.io/opensensemap/frontend
133133

134+
- name: 👓 Read .nvmrc
135+
id: nvmrc
136+
run: |
137+
echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
138+
134139
- name: 🔑 GitHub Registry Auth
135140
uses: docker/login-action@v3
136141
with:
@@ -148,6 +153,7 @@ jobs:
148153
labels: ${{ steps.meta.outputs.labels }}
149154
build-args: |
150155
COMMIT_SHA=${{ github.sha }}
156+
NODE_VERSION=${{ steps.nvmrc.outputs.NODE_VERSION }}
151157
cache-from: type=local,src=/tmp/.buildx-cache
152158
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
153159

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ measurements.csv
2222

2323
.react-router/
2424

25-
/coverage
25+
/coverage
26+
27+
/minio-data

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v24.4.1
1+
24.4.1

other/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
ARG NODE_VERSION=current
2+
13
# base node image
2-
FROM node:22-bullseye-slim AS base
4+
FROM node:${NODE_VERSION}-slim AS base
35

46
# set for base and all layer that inherit from it
57
ENV NODE_ENV=production

0 commit comments

Comments
 (0)