Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@ AWS_ACCESS_KEY_ID=user
AWS_SECRET_ACCESS_KEY=password
GF_SECURITY_ADMIN_PASSWORD=password
GF_SECURITY_ADMIN_USER=admin
INFLUXDB_ADMIN_PASSWORD=password
INFLUXDB_ADMIN_USER=admin
INFLUXDB_PASSWORD=password
INFLUXDB_USERNAME=admin
INFLUXDB_DB=alfalfa
INFLUXDB_HOST=influxdb
INFLUXDB_HTTP_AUTH_ENABLED=true
JOB_QUEUE=Alfalfa Job Queue
LOGGING=false
MONGO_DB_NAME=alfalfa
MONGO_URL=mongodb://mongo:27017
MONGO_INITDB_ROOT_USERNAME=admin
MONGO_INITDB_ROOT_PASSWORD=password
MONGO_INITDB_DATABASE=alfalfa
MONGO_URL=mongodb://admin:password@mongo:27017/alfalfa?authSource=admin
NODE_ENV=production
REDIS_HOST=redis
REGION=us-west-1
REDIS_URL=redis://redis:6379/0
S3_REGION=us-west-1
S3_BUCKET=alfalfa
S3_URL=http://minio:9000
S3_URL_EXTERNAL=http://localhost:9000
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.11"

- name: Install poetry
uses: abatilo/actions-poetry@v3
Expand All @@ -199,7 +199,7 @@ jobs:
uses: docker/bake-action@v5
with:
load: true
files: docker-compose.yml, docker-compose.dev.yml, docker-compose.historian.yml
files: docker-compose.yml, docker-compose.historian.yml
set: |
web.cache-from=type=gha,scope=web:${{ github.ref_name }}
web.output=type=docker
Expand Down Expand Up @@ -247,6 +247,10 @@ jobs:
uses: jwalton/gh-docker-logs@v2

publish:
permissions:
contents: read
packages: write
name: Build and publish Docker images
needs: [pre-commit, unit-tests, simulation-tests, integration-tests, integration-tests-historian]
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
Expand Down Expand Up @@ -280,9 +284,6 @@ jobs:
type=raw,value=latest,enable=${{ github.event_name == 'release' }}
type=edge

- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3

- name: Build Push
run: |
/usr/bin/docker buildx bake \
Expand Down
5 changes: 3 additions & 2 deletions alfalfa_web/.babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ const presets = [
]
];

if (isProd) presets.push(["minify", { builtIns: false }]);
// Use Webpack's built-in Terser for minification instead of babel-preset-minify
// which has compatibility issues with newer Babel versions

module.exports = {
assumptions: {
noDocumentAll: true,
noClassCalls: true
},
comments: false,
plugins: ["@babel/plugin-proposal-class-properties"],
plugins: ["@babel/plugin-transform-class-properties"],
presets,
sourceMaps: isProd ? false : "inline"
};
4 changes: 2 additions & 2 deletions alfalfa_web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16 AS base
FROM node:22-slim AS base
ARG GIT_COMMIT
ENV GIT_COMMIT=$GIT_COMMIT

Expand All @@ -15,7 +15,7 @@ COPY alfalfa_web /srv/alfalfa

ARG NODE_ENV
RUN npm run build
CMD [ "npm", "start" ]
CMD [ "node", "build/index.js" ]

# **** Staged build for running in development mode ****
FROM base AS dev
Expand Down
10 changes: 6 additions & 4 deletions alfalfa_web/components/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ import React from "react";
import "@fontsource/material-icons";
import "@fontsource/roboto";
import "normalize.css/normalize.css";
import ReactDOM from "react-dom";
import { createRoot } from "react-dom/client";
import { BrowserRouter } from "react-router-dom";
import { App } from "./App/App.js";

ReactDOM.render(
const container = document.getElementById("root");
const root = createRoot(container);

root.render(
<BrowserRouter>
<React.StrictMode>
<App />
</React.StrictMode>
</BrowserRouter>,
document.getElementById("root")
</BrowserRouter>
);
Loading
Loading