Skip to content

Commit 8d736e1

Browse files
authored
Merge pull request #110 from WXYC/fix/default-auth-port
Allow working deploy with expected 8080 port within container
2 parents da53823 + 7b598ae commit 8d736e1

File tree

6 files changed

+12
-17
lines changed

6 files changed

+12
-17
lines changed

Dockerfile.auth

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,4 @@ COPY --from=builder ./auth-builder/apps/auth/dist ./apps/auth/dist
2626
COPY --from=builder ./auth-builder/shared/database/dist ./shared/database/dist
2727
COPY --from=builder ./auth-builder/shared/authentication/dist ./shared/authentication/dist
2828

29-
EXPOSE 8082
30-
3129
CMD ["npm", "start", "--workspace=@wxyc/auth-service"]

Dockerfile.backend

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,4 @@ COPY --from=builder ./builder/apps/backend/dist ./apps/backend/dist
2626
COPY --from=builder ./builder/shared/database/dist ./shared/database/dist
2727
COPY --from=builder ./builder/shared/authentication/dist ./shared/authentication/dist
2828

29-
EXPOSE 8080
30-
3129
CMD ["npm", "start", "--workspace=@wxyc/backend"]

apps/auth/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { toNodeHandler } from 'better-auth/node';
77
import cors from 'cors';
88
import express from 'express';
99

10-
const port = process.env.AUTH_PORT || '8082';
10+
const port = process.env.AUTH_PORT || '8080';
1111

1212
const app = express();
1313

apps/backend/app.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { showMemberMiddleware } from './middleware/checkShowMember.js';
1414
import { activeShow } from './middleware/checkActiveShow.js';
1515
import errorHandler from './middleware/errorHandler.js';
1616
import { requirePermissions } from '@wxyc/authentication';
17-
// import errorHandler from './middleware/errorHandler';
1817

1918
const port = process.env.PORT || 8080;
2019
const app = express();
@@ -59,7 +58,7 @@ app.use(
5958
);
6059

6160
//example for how to use te Cognito auth middleware
62-
app.get('/testAuth', requirePermissions({ flowsheet: ["read"] }), async (req, res) => {
61+
app.get('/testAuth', requirePermissions({ flowsheet: ['read'] }), async (req, res) => {
6362
res.json({ message: 'Authenticated!' });
6463
});
6564

dev_env/docker-compose.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ services:
9494
- DB_USERNAME=${DB_USERNAME}
9595
- DB_PASSWORD=${DB_PASSWORD}
9696
- DB_NAME=${DB_NAME}
97-
- BETTER_AUTH_URL=http://auth:8082/api/auth
98-
- BETTER_AUTH_JWKS_URL=http://auth:8082/api/auth/jwks
99-
- BETTER_AUTH_ISSUER=http://auth:8082
100-
- BETTER_AUTH_AUDIENCE=http://auth:8082
97+
- BETTER_AUTH_URL=http://auth:8080/api/auth
98+
- BETTER_AUTH_JWKS_URL=http://auth:8080/api/auth/jwks
99+
- BETTER_AUTH_ISSUER=http://auth:8080
100+
- BETTER_AUTH_AUDIENCE=http://auth:8080
101101
- BETTER_AUTH_TRUSTED_ORIGINS=${BETTER_AUTH_TRUSTED_ORIGINS}
102102
- FRONTEND_SOURCE=${FRONTEND_SOURCE}
103103
- DEFAULT_ORG_SLUG=${DEFAULT_ORG_SLUG}
@@ -109,7 +109,7 @@ services:
109109
- DEFAULT_USER_REAL_NAME=${DEFAULT_USER_REAL_NAME}
110110
- CREATE_DEFAULT_USER=${CREATE_DEFAULT_USER}
111111
ports:
112-
- '${CI_AUTH_PORT:-8083}:8082'
112+
- '${CI_AUTH_PORT:-8083}:8080'
113113

114114
backend:
115115
depends_on:
@@ -130,10 +130,10 @@ services:
130130
- AUTH_USERNAME=${AUTH_USERNAME}
131131
- COGNITO_USERPOOL_ID=${COGNITO_USERPOOL_ID}
132132
- DJ_APP_CLIENT_ID=${DJ_APP_CLIENT_ID}
133-
- BETTER_AUTH_URL=http://auth:8082/api/auth
134-
- BETTER_AUTH_AUDIENCE=http://auth:8082
135-
- BETTER_AUTH_ISSUER=http://auth:8082
136-
- BETTER_AUTH_JWKS_URL=http://auth:8082/api/auth/jwks
133+
- BETTER_AUTH_URL=http://auth:8080/api/auth
134+
- BETTER_AUTH_AUDIENCE=http://auth:8080
135+
- BETTER_AUTH_ISSUER=http://auth:8080
136+
- BETTER_AUTH_JWKS_URL=http://auth:8080/api/auth/jwks
137137
ports:
138138
- '${CI_PORT:-8081}:8080'
139139

tests/test.setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const get_access_token = require('./utils/better_auth');
2-
const waitOn = require('wait-on'); // Import wait-on
2+
const waitOn = require('wait-on');
33

44
global.primary_dj_id = 1;
55
global.secondary_dj_id = 2;

0 commit comments

Comments
 (0)