Skip to content

Commit

Permalink
feat: added grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
brycegoh committed Nov 4, 2023
1 parent 0175dc2 commit 990b754
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 10 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ jobs:
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:firecloud_${{github.run_number}} .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:firecloud_${{github.run_number}}
- name: Replace image in dockerrun file
- name: Replace image in docker compose file
env:
ECR_REPOSITORY: ${{ env.ECR_REPOSITORY }}
ECR_REPOSITORY_URI: ${{ env.ECR_REPOSITORY_URI }}
run: |
cp Dockerrun.prod.aws.json Dockerrun.aws.json
sed -i "s/<ECR_REGISTRY>/$ECR_REPOSITORY_URI/g" Dockerrun.aws.json
sed -i "s/<SERVER_NAME>/$ECR_REPOSITORY/g" Dockerrun.aws.json
sed -i "s/<TAG>/firecloud_${{github.run_number}}/g" Dockerrun.aws.json
cp docker-compose.prod.yml docker-compose.yml
sed -i "s/<ECR_REGISTRY>/$ECR_REPOSITORY_URI/g" docker-compose.yml
sed -i "s/<SERVER_NAME>/$ECR_REPOSITORY/g" docker-compose.yml
sed -i "s/<TAG>/firecloud_${{github.run_number}}/g" docker-compose.yml
- name: Zip the dockerrun file
- name: Zip the docker compose file
run: |
zip deploy.zip Dockerrun.aws.json
zip deploy.zip docker-compose.yml
- name: Upload zip to S3
env:
Expand Down
4 changes: 1 addition & 3 deletions fire-cloud/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@ COPY . .

EXPOSE 3000

ENV NODE_ENV=production

CMD [ "node", "index.js" ]
ENV NODE_ENV=production
24 changes: 24 additions & 0 deletions fire-cloud/docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: '3'

services:
firecloud:
image: "<ECR_REGISTRY>/<SERVER_NAME>:<TAG>"
restart: always
expose:
- "3001"
ports:
- "3001:3001"
command: "node index.js"

grafana:
image: grafana/grafana-oss:latest
restart: always
ports:
- "80:3000"
volumes:
- grafana-storage:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_PASSWORD=greendot
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
grafana-storage:

0 comments on commit 990b754

Please sign in to comment.