9 Commits

Author SHA1 Message Date
dcd1f522ad Merge branch 'main' into external-links-and-app-messages 2025-12-10 20:21:24 -06:00
22c909cfa5 increase logging in deploy script
All checks were successful
Continuous Integration / Update Development (push) Successful in 2m24s
for some reason it seems to not be fully updating the local repo, so increase logging and double pull
2025-12-10 20:20:06 -06:00
50b9924627 deployment versioning
Some checks failed
Continuous Integration / Update Development (push) Successful in 1m58s
Continuous Deployment / Update Deployment (push) Failing after 2m12s
port development versioning to deployment, but using tags instead of short sha
2025-12-10 11:50:07 -06:00
d44d490905 version parsing fix
All checks were successful
Continuous Integration / Update Development (push) Successful in 2m13s
attempt parse fix because i forgot this isn't running on windows
2025-12-10 11:43:40 -06:00
114857cceb debug workflow
Some checks failed
Continuous Integration / Update Development (push) Failing after 1m49s
is sed really not included?
2025-12-10 11:35:58 -06:00
0245cb38f4 enable development app versioning
Some checks failed
Continuous Integration / Update Development (push) Failing after 2m16s
parse git commit short sha and use as app version in development
2025-12-10 11:30:13 -06:00
4e443cf46d Fixed glitchtip enable/disable to behave as expected and added support for ENV versioning
All checks were successful
Continuous Integration / Update Development (push) Successful in 2m27s
2025-12-10 00:18:09 -05:00
be53fce4a5 Merge pull request 'Calendar-Improvements' (#57) from Calendar-Improvements into main
All checks were successful
Continuous Integration / Update Development (push) Successful in 2m23s
Reviewed-on: #57
2025-12-09 21:21:24 -06:00
9720ee6ada Updated GUILDED references and links.
Some checks failed
Continuous Deployment / Update Deployment (push) Failing after 1m22s
2025-12-08 17:55:33 -06:00
8 changed files with 48 additions and 19 deletions

View File

@@ -22,12 +22,14 @@ jobs:
with: with:
node-version: 20.19 node-version: 20.19
- name: Verify Node Environment - name: Verify Local Environment
run: | run: |
which npm which npm
npm -v npm -v
which node which node
node -v node -v
which sed
sed --version
- name: Checkout - name: Checkout
uses: actions/checkout@v5 uses: actions/checkout@v5
@@ -44,8 +46,14 @@ jobs:
- name: Update Application Code - name: Update Application Code
run: | run: |
cd /var/www/html/milsim-site-v4 cd /var/www/html/milsim-site-v4
version=`git log -1 --format=%H`
echo "Current Revision: $version"
echo "Updating to: ${{ github.sha }}
sudo -u nginx git reset --hard sudo -u nginx git reset --hard
sudo -u nginx git pull origin main sudo -u nginx git pull origin main
sudo -u nginx git pull origin main
new_version=`git log -1 --format=%H`
echo "Sucessfully updated to: $new_version
- name: Update Shared Dependencies and Fix Permissions - name: Update Shared Dependencies and Fix Permissions
run: | run: |
@@ -65,16 +73,20 @@ jobs:
npm install npm install
chown -R nginx:nginx . chown -R nginx:nginx .
- name: Build UI and Fix Permissions - name: Build UI / Update Version / Fix Permissions
run: | run: |
cd /var/www/html/milsim-site-v4/ui cd /var/www/html/milsim-site-v4/ui
npm run build npm run build
version=`git describe --abbrev=0 --tags`
sed -i "s/VITE_APPLICATION_VERSION=.*/VITE_APPLICATION_VERSION=$version/" .env
chown -R nginx:nginx . chown -R nginx:nginx .
- name: Build API and Fix Permissions - name: Build API / Update Version / Fix Permissions
run: | run: |
cd /var/www/html/milsim-site-v4/api cd /var/www/html/milsim-site-v4/api
npm run build npm run build
version=`git describe --abbrev=0 --tags`
sed -i "s/APPLICATION_VERSION=.*/APPLICATION_VERSION=$version/" .env
chown -R nginx:nginx . chown -R nginx:nginx .
- name: Reset File Permissions - name: Reset File Permissions

View File

@@ -22,12 +22,14 @@ jobs:
with: with:
node-version: 20.19 node-version: 20.19
- name: Verify Node Environment - name: Verify Local Environment
run: | run: |
which npm which npm
npm -v npm -v
which node which node
node -v node -v
which sed
sed --version
- name: Checkout - name: Checkout
uses: actions/checkout@v5 uses: actions/checkout@v5
@@ -65,16 +67,20 @@ jobs:
npm install npm install
chown -R nginx:nginx . chown -R nginx:nginx .
- name: Build UI and Fix Permissions - name: Build UI / Update Version / Fix Permissions
run: | run: |
cd /var/www/html/milsim-site-v4/ui cd /var/www/html/milsim-site-v4/ui
npm run build npm run build
version=`git rev-parse --short=10 HEAD`
sed -i "s/VITE_APPLICATION_VERSION=.*/VITE_APPLICATION_VERSION=$version/" .env
chown -R nginx:nginx . chown -R nginx:nginx .
- name: Build API and Fix Permissions - name: Build API / Update Version / Fix Permissions
run: | run: |
cd /var/www/html/milsim-site-v4/api cd /var/www/html/milsim-site-v4/api
npm run build npm run build
version=`git rev-parse --short=10 HEAD`
sed -i "s/APPLICATION_VERSION=.*/APPLICATION_VERSION=$version/" .env
chown -R nginx:nginx . chown -R nginx:nginx .
- name: Reset File Permissions - name: Reset File Permissions

View File

@@ -19,6 +19,8 @@ AUTH_END_SESSION_URI=
SERVER_PORT=3000 SERVER_PORT=3000
CLIENT_URL= # This is whatever URL the client web app is served on CLIENT_URL= # This is whatever URL the client web app is served on
CLIENT_DOMAIN= #whatever.com CLIENT_DOMAIN= #whatever.com
APPLICATION_VERSION= # Should match release tag
APPLICATION_ENVIRONMENT= # dev / prod
# Glitchtip # Glitchtip
GLITCHTIP_DSN= GLITCHTIP_DSN=

View File

@@ -20,11 +20,14 @@ const port = process.env.SERVER_PORT;
//glitchtip setup //glitchtip setup
const sentry = require('@sentry/node'); const sentry = require('@sentry/node');
if (process.env.DISABLE_GLITCHTIP) { if (process.env.DISABLE_GLITCHTIP === "true") {
console.log("Glitchtip disabled") console.log("Glitchtip disabled")
} else { } else {
let dsn = process.env.GLITCHTIP_DSN; let dsn = process.env.GLITCHTIP_DSN;
sentry.init({ dsn: dsn }); let release = process.env.APPLICATION_VERSION;
let environment = process.env.APPLICATION_ENVIRONMENT;
console.log(release, environment)
sentry.init({ dsn: dsn, release: release, environment: environment });
console.log("Glitchtip initialized"); console.log("Glitchtip initialized");
} }
@@ -58,6 +61,7 @@ const { roles, memberRoles } = require('./routes/roles');
const { courseRouter, eventRouter } = require('./routes/course'); const { courseRouter, eventRouter } = require('./routes/course');
const { calendarRouter } = require('./routes/calendar') const { calendarRouter } = require('./routes/calendar')
const morgan = require('morgan'); const morgan = require('morgan');
const { env } = require('process');
app.use('/application', applicationsRouter); app.use('/application', applicationsRouter);
app.use('/ranks', ranks); app.use('/ranks', ranks);

View File

@@ -21,12 +21,13 @@ passport.use(new OpenIDConnectStrategy({
scope: ['openid', 'profile'] scope: ['openid', 'profile']
}, async function verify(issuer, sub, profile, jwtClaims, accessToken, refreshToken, params, cb) { }, async function verify(issuer, sub, profile, jwtClaims, accessToken, refreshToken, params, cb) {
// console.log('--- OIDC verify() called ---'); console.log('--- OIDC verify() called ---');
// console.log('issuer:', issuer); console.log('issuer:', issuer);
// console.log('sub:', sub); console.log('sub:', sub);
// console.log('profile:', JSON.stringify(profile, null, 2)); // console.log('profile:', JSON.stringify(profile, null, 2));
// console.log('id_token claims:', JSON.stringify(jwtClaims, null, 2)); console.log('profile:', profile);
// console.log('preferred_username:', jwtClaims?.preferred_username); console.log('id_token claims:', JSON.stringify(jwtClaims, null, 2));
console.log('preferred_username:', jwtClaims?.preferred_username);
const con = await pool.getConnection(); const con = await pool.getConnection();
try { try {

View File

@@ -1,6 +1,8 @@
# SITE SETTINGS # SITE SETTINGS
VITE_APIHOST= VITE_APIHOST=
VITE_ENVIRONMENT= # dev / prod VITE_ENVIRONMENT= # dev / prod
VITE_APPLICATION_VERSION= # Should match release tag
# Glitchtip # Glitchtip
VITE_GLITCHTIP_DSN= VITE_GLITCHTIP_DSN=

View File

@@ -20,10 +20,12 @@ const app = createApp(App)
app.use(createPinia()) app.use(createPinia())
app.use(router) app.use(router)
if (!import.meta.env.VITE_DISABLE_GLITCHTIP) { if (import.meta.env.VITE_DISABLE_GLITCHTIP === "true") {
console.log("Glitchtip disabled");
} else {
let dsn = import.meta.env.VITE_GLITCHTIP_DSN; let dsn = import.meta.env.VITE_GLITCHTIP_DSN;
let environment = import.meta.env.VITE_ENVIRONMENT; let environment = import.meta.env.VITE_ENVIRONMENT;
let release = import.meta.env.VITE_APPLICATION_VERSION;
Sentry.init({ Sentry.init({
app, app,
dsn: dsn, dsn: dsn,
@@ -32,7 +34,7 @@ if (!import.meta.env.VITE_DISABLE_GLITCHTIP) {
], ],
tracesSampleRate: 0.01, tracesSampleRate: 0.01,
environment: environment, environment: environment,
release: 'release tag' release: release
}); });
} }

View File

@@ -171,9 +171,9 @@ const finalPanel = ref<'app' | 'message'>('message');
<li>When prompted, choose <em>“Yes”</em> to download all associated mods.</li> <li>When prompted, choose <em>“Yes”</em> to download all associated mods.</li>
</ul> </ul>
<p> <p>
<a href="https://www.guilded.gg/Iceberg-gaming/groups/v3j2vAP3/channels/6979335e-60f7-4ab9-9590-66df69367d1e/docs/2013948655" <a href="https://docs.iceberg-gaming.com/books/member-guides/page/new-member-setup-onboarding"
class="text-primary underline" target="_blank"> class="text-primary underline" target="_blank">
Click here for the full installation guide Click here for the full installation guide (Requires Sign-in)
</a> </a>
</p> </p>
<!-- CONTACT SECTION --> <!-- CONTACT SECTION -->
@@ -211,7 +211,7 @@ const finalPanel = ref<'app' | 'message'>('message');
our forums and introduce yourself. our forums and introduce yourself.
</p> </p>
<p> <p>
If you have any questions, feel free to reach out on TeamSpeak, Discord, or Guilded, If you have any questions, feel free to reach out on TeamSpeak or Discord
someone someone
will always be around to help. will always be around to help.
</p> </p>