Skip to content

Commit cddd7fb

Browse files
committed
Merge branch 'email_templates' of https://github.com/hackmcgill/hackerAPI into feature/180-email_templates
2 parents c0674a1 + 918bed3 commit cddd7fb

16 files changed

Lines changed: 157 additions & 36 deletions

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ PORT=<Some Port such as 3000>
33
#The address on which the server is being run:
44
ADDRESS=<Some address such as 127.0.0.1>
55

6+
#front-end server
7+
FRONTEND_ADDRESS_DEV=localhost:1337
8+
FRONTEND_ADDRESS_DEPLOY=app.mchacks.ca
9+
610
#The info for the deployment database
711
DB_ADDRESS_DEPLOY=<Deployment address>
812
DB_USER_DEPLOY=<username for db connection>

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,8 @@ gcp_creds.json
6363

6464
#certbot
6565
certbot/
66+
6667
assets/.DS_Store
68+
69+
#secrets
70+
secret.yaml

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"node":true,
55
"this":false,
66
"bad_property":false
7-
}
7+
},
8+
"search.usePCRE2": true
89
}

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ WORKDIR /usr/src/app
77
COPY package*.json ./
88
ADD VERSION .
99

10+
RUN npm install -g n
11+
RUN n 9.9.0
12+
RUN npm install npm -g
1013
RUN npm install
1114

1215
COPY . .

PULL_REQUEST_TEMPLATE.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Description
2+
3+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
4+
5+
Fixes # (issue)
6+
7+
## Type of change
8+
9+
Please delete options that are not relevant.
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] This change requires a documentation update
15+
16+
# How Has This Been Tested?
17+
18+
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
19+
20+
- [ ] Test A
21+
- [ ] Test B
22+
23+
**Test Configuration**:
24+
* Firmware version:
25+
* Hardware:
26+
* Toolchain:
27+
* SDK:
28+
29+
# Checklist:
30+
31+
- [ ] My code follows the style guidelines of this project
32+
- [ ] I have performed a self-review of my own code
33+
- [ ] I have commented my code, particularly in hard-to-understand areas
34+
- [ ] I have made corresponding changes to the documentation
35+
- [ ] My changes generate no new warnings
36+
- [ ] I have added tests that prove my fix is effective or that my feature works
37+
- [ ] New and existing unit tests pass locally with my changes
38+
- [ ] Any dependent changes have been merged and published in downstream modules

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.1
1+
1.0.3

app.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,16 @@ Services.db.connect(app);
3535
let corsOptions = {};
3636

3737
if (!Services.env.isProduction()) {
38-
corsOptions = { origin: ["http://localhost:1337", "http://localhost:8989"], credentials: true };
38+
corsOptions = {
39+
origin: [process.env.FRONTEND_ADDRESS_DEV],
40+
credentials: true
41+
};
3942
} else {
4043
// TODO: change this when necessary
41-
corsOptions = { origin: ["https://mchacks.ca/"], credentials: true };
44+
corsOptions = {
45+
origin: [process.env.FRONTEND_ADDRESS_DEPLOY],
46+
credentials: true
47+
};
4248
}
4349

4450
app.use(cors(corsOptions));
@@ -79,6 +85,7 @@ searchRouter.activate(apiRouter);
7985
Services.log.info("Search router activated");
8086

8187
apiRouter.use("/", indexRouter);
88+
app.use("/", indexRouter);
8289

8390
app.use("/api", apiRouter);
8491

assets/email/AccountInvitation.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,4 +439,4 @@
439439
</center>
440440
</body>
441441

442-
</html>
442+
</html>

deployment.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: hackboard
5+
spec:
6+
selector:
7+
matchLabels:
8+
run: hackboard
9+
replicas: 1
10+
template:
11+
metadata:
12+
labels:
13+
run: hackboard
14+
spec:
15+
volumes:
16+
- name: secret-volume
17+
secret:
18+
secretName: hackboard-secret
19+
containers:
20+
- name: hackboard
21+
image: gcr.io/mchacks-api/hackboard:1.0.2
22+
ports:
23+
# - containerPort: 443
24+
- containerPort: 8080

ingress.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: extensions/v1beta1
2+
kind: Ingress
3+
metadata:
4+
name: hackboard-ingress
5+
annotations:
6+
kubernetes.io/ingress.global-static-ip-name: hackboard-ingress-static-ip
7+
spec:
8+
# tls:
9+
# - secretName: hackboard-secret
10+
# rules:
11+
# - http:
12+
# paths:
13+
# - path: /*
14+
backend:
15+
serviceName: hackboard-service
16+
servicePort: 80

0 commit comments

Comments
 (0)