Skip to content

Commit 895b796

Browse files
authored
Merge branch 'master' into develop
2 parents 57ffa2d + d784de4 commit 895b796

8 files changed

Lines changed: 118 additions & 4 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,7 @@ node_modules
6262
gcp_creds.json
6363

6464
#certbot
65-
certbot/
65+
certbot/
66+
67+
#secrets
68+
secret.yaml

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: ["http://localhost:1337", "http://localhost:8989"],
40+
credentials: true
41+
};
3942
} else {
4043
// TODO: change this when necessary
41-
corsOptions = { origin: ["https://mchacks.ca/"], credentials: true };
44+
corsOptions = {
45+
origin: ["https://mchacks.ca/"],
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

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

service.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: hackboard-service
5+
labels:
6+
run: hackboard # because that's the label on the deployment (not sure what labels do tho)
7+
# annotations:
8+
# cloud.google.com/app-protocols: '{"hackboard-https-port":"HTTPS","hackboard-http-port":"HTTP"}'
9+
spec:
10+
selector:
11+
run: hackboard # because that's the selector on the deployment (not sure what labels do tho)
12+
ports:
13+
- name: http #hackboard-http-port
14+
protocol: TCP
15+
port: 80
16+
targetPort: 8080 # because the deployment port is 80/TCP
17+
# - name: hackboard-https-port
18+
# protocol: TCP
19+
# port: 443
20+
type: LoadBalancer
21+
22+
# endpoint of service same as ip of pods -> means communication between service and pod (direction?)
23+
# can talk to this service with cluster-ip:port from any other node on cluster

0 commit comments

Comments
 (0)