Skip to content

Commit 109b502

Browse files
author
Urban Ishimwe
committed
configure deployment
1 parent 836462b commit 109b502

10 files changed

+9358
-14584
lines changed

.eslintrc.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
"node": {
1717
"extensions": [".json", ".js", ".jsx"]
1818
}
19-
}
19+
},
20+
"react": {
21+
"version": "detect"
22+
}
2023
},
2124
"rules": {
2225
"prefer-object-spread": 0,

.github/ISSUE_TEMPLATE.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
* **I'm submitting a ...**
22
- [ ] bug report
33
- [ ] feature request
4-
- [ ] support request => Please do not submit support request here, see note at the top of this template.
4+
- [ ] proposal
55

66
* **What is the current behavior?**
77

88
* **What is the expected behavior?(how you want it to be)**
99

10-
* **Please tell us about your environment:**
10+
* **Please tell us about your environment(optional for feature/proposal):**
1111

1212
- node version:
13-
- Browser:
14-
- Angular version:
1513
- typescript version:
1614
- package manager(yarn or npm):

.github/PULL_REQUEST_TEMPLATE.md

-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
#### Description of Task to be completed?
33
#### How should this be manually tested?
44
#### Any background context you want to provide?
5-
#### What are the relevant pivotal tracker stories?
65
#### Screenshots (if appropriate)
76
#### Questions:

.github/workflows/deploy-develop.yml

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
1-
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
2-
# More GitHub Actions for Azure: https://github.com/Azure/actions
3-
4-
name: Build and deploy Node.js app to Azure Web App - ros-frontend(staging)
1+
name: Develop Deploy
52

63
on:
74
push:
85
branches:
96
- develop
107

118
jobs:
12-
build-and-deploy:
9+
build:
10+
name: build
1311
runs-on: ubuntu-latest
14-
1512
steps:
16-
- uses: actions/checkout@master
1713

18-
- uses: azure/docker-login@v1
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: build and push image
18+
uses: docker/build-push-action@v1
1919
with:
20-
login-server: rosdocker.azurecr.io
21-
username: ${{ secrets.REGISTRY_USERNAME }}
20+
username: ${{ secrets.REGISTRY_USERNAME }}
2221
password: ${{ secrets.REGISTRY_PASSWORD }}
22+
repository: rwandaopensource/opensource
23+
tags: staging
2324

24-
- name: 'Building image and pushing image'
25-
run: |
26-
docker build . -t rosdocker.azurecr.io/staging:latest
27-
docker push rosdocker.azurecr.io/staging:latest
25+
- name: trigger netlify build hooks
26+
uses: wei/curl@v1
27+
with:
28+
args: -X POST -d '{}' ${{ secrets.STAGING_BUILD_HOOK }}

.github/workflows/deploy-master.yml

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
1-
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
2-
# More GitHub Actions for Azure: https://github.com/Azure/actions
3-
4-
name: Build and deploy Node.js app to Azure Web App - ros-frontend
1+
name: Master Deploy
52

63
on:
74
push:
85
branches:
96
- master
107

118
jobs:
12-
build-and-deploy:
9+
build:
10+
name: build
1311
runs-on: ubuntu-latest
14-
1512
steps:
16-
- uses: actions/checkout@master
1713

18-
- uses: azure/docker-login@v1
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: build and push image
18+
uses: docker/build-push-action@v1
1919
with:
20-
login-server: rosdocker.azurecr.io
21-
username: ${{ secrets.REGISTRY_USERNAME }}
20+
username: ${{ secrets.REGISTRY_USERNAME }}
2221
password: ${{ secrets.REGISTRY_PASSWORD }}
22+
repository: rwandaopensource/opensource
23+
tags: lts
2324

24-
- name: 'Building image and pushing image'
25-
run: |
26-
docker build . -t rosdocker.azurecr.io/app:latest
27-
docker push rosdocker.azurecr.io/app:latest
25+
- name: trigger netlify build hooks
26+
uses: wei/curl@v1
27+
with:
28+
args: -X POST -d '{}' ${{ secrets.PRODUCTION_BUILD_HOOK }}

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ pids
1010
*.pid
1111
*.seed
1212
*.pid.lock
13-
yarn.lock
1413
# Directory for instrumented libs generated by jscoverage/JSCover
1514
lib-cov
1615

@@ -37,7 +36,8 @@ build/Release
3736
# Dependency directories
3837
node_modules/
3938
jspm_packages/
40-
*.DS_Store
39+
*.DS_Store*
40+
package-lock.json
4141

4242
# TypeScript v1 declaration files
4343
typings/

Dockerfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
FROM node:12-alpine
22

3-
RUN mkdir -p /home/site/wwwroot
4-
WORKDIR /home/site/wwwroot
3+
RUN mkdir -p /app
4+
WORKDIR /app
55
COPY . .
6-
RUN npm install && \
7-
npm run build && \
6+
RUN yarn && \
7+
yarn build && \
88
rm -rf public/ && \
99
rm -rf node_modules/ && \
1010
rm -rf src/
11-
RUN npm install --only=production
11+
RUN yarn install --production=true
1212

13-
CMD ["npm", "start"]
13+
CMD ["yarn", "start"]

0 commit comments

Comments
 (0)