Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into next-v12
Browse files Browse the repository at this point in the history
  • Loading branch information
cdebbaruah committed Jan 31, 2025
2 parents c36ee87 + 76279be commit 382ff23
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 1 deletion.
Empty file.
37 changes: 37 additions & 0 deletions .github/workflows/new_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy

on:
push:
branches: [master]
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
# Check out the repository
- name: Check out code
uses: actions/checkout@v3

# Set up Docker
- name: Set up Docker
uses: docker/setup-buildx-action@v3

# Log in to DigitalOcean Container Registry
- name: Log in to DigitalOcean
run: echo "${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}" | docker login -u "doctl" --password-stdin registry.digitalocean.com

# Build and push Docker image
- name: Build and push Docker image
run: |
docker buildx build --platform linux/amd64,linux/arm64 \
--tag registry.digitalocean.com/dailybruin/dbonline:latest \
--push .
# Update Kubernetes deployment
- name: Update Kubernetes deployment
env:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
run: |
kubectl set image deployment/<flamingo> <container-name>=registry.digitalocean.com/dailybruin/dbonline:latest
kubectl rollout status deployment/<flamingo>
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:16.20.2

RUN apt-get update && apt-get install -y \
yarn

WORKDIR /usr/src/flamingo

COPY .next ./.next

COPY node_modules ./node_modules

COPY package.json .

COPY yarn.lock .

EXPOSE 1919

CMD ["yarn", "deploy"]
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

yarn build
docker build --platform="linux/amd64" -t registry.digitalocean.com/dailybruin/flamingotestedamd64:latest .
docker push registry.digitalocean.com/dailybruin/flamingotestedamd64:latest
3 changes: 2 additions & 1 deletion components/CommentFAB/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export default class CommentFAB extends React.Component {
return (
<a
target="_blank"
href="https://docs.google.com/forms/d/e/1FAIpQLSdkQCXXAnvFuY7TJJq_kRrlOs8os7N8u9tJ25qQjfw9BttpWw/viewform?usp=sf_link"
href="https://docs.google.com/forms/d/e/1FAIpQLSeCsyRAFuUVYEdSA9wQhdimmn6lzgSUBMepSvpP_QU5YsVSnQ/viewform"
//href="https://docs.google.com/forms/d/e/1FAIpQLSdkQCXXAnvFuY7TJJq_kRrlOs8os7N8u9tJ25qQjfw9BttpWw/viewform?usp=sf_link"
css={css`
display: block;
position: fixed;
Expand Down
3 changes: 3 additions & 0 deletions pages/api/healthy.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function handler(req, res) {
res.status(200).json({ "status": "ok" })
}
6 changes: 6 additions & 0 deletions pages/api/hostname.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var os = require("os");
var hostname = os.hostname();

export default function handler(req, res) {
res.status(200).json({ "hostname": hostname })
}

0 comments on commit 382ff23

Please sign in to comment.