-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into feature/asignar-volun…
…tario
- Loading branch information
Showing
22 changed files
with
388 additions
and
4,711 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Deploy webapp | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up kubectl | ||
run: | | ||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | ||
chmod +x ./kubectl | ||
sudo mv ./kubectl /usr/local/bin/kubectl | ||
- name: Configure kubectl | ||
run: | | ||
echo "${{ secrets.KUBECONFIG }}" > kubeconfig.yml | ||
echo "KUBECONFIG=$PWD/kubeconfig.yml" >> $GITHUB_ENV | ||
- name: Replace variables in Kubernetes manifests | ||
run: | | ||
sed -i "s|VAR_GITHUB_COMMIT_HASH|${{ github.sha }}|g" ./kubernetes.yml | ||
sed -i "s|VAR_GITHUB_TOKEN|${{ secrets.GH_TOKEN }}|g" ./kubernetes.yml | ||
sed -i "s|VAR_SUPABASE_URL|${{ secrets.SUPABASE_URL }}|g" ./kubernetes.yml | ||
sed -i "s|VAR_SUPABASE_ANON_KEY|${{ secrets.SUPABASE_ANON_KEY }}|g" ./kubernetes.yml | ||
sed -i "s|VAR_DATADOG_API_KEY|${{ secrets.DATADOG_API_KEY }}|g" ./kubernetes.yml | ||
- name: Delete existing job | ||
run: | | ||
kubectl delete job emergency-cv--webapp--build--job --namespace production || true | ||
- name: Apply Kubernetes manifests | ||
run: | | ||
kubectl apply -f ./kubernetes.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,31 @@ | ||
FROM node:18-alpine | ||
ARG CACHE_BURST=1 | ||
|
||
# Add build arguments for Supabase | ||
ARG NEXT_PUBLIC_SUPABASE_URL | ||
ARG NEXT_PUBLIC_SUPABASE_ANON_KEY | ||
|
||
# Set environment variables | ||
ENV NODE_ENV="production" \ | ||
ENV NODE_ENV="development" \ | ||
NEXT_TELEMETRY_DISABLED=1 \ | ||
NEXT_PUBLIC_SUPABASE_URL=$NEXT_PUBLIC_SUPABASE_URL \ | ||
NEXT_PUBLIC_SUPABASE_ANON_KEY=$NEXT_PUBLIC_SUPABASE_ANON_KEY | ||
|
||
WORKDIR /app | ||
|
||
COPY ./package.json ./yarn.lock ./ | ||
COPY package*.json ./ | ||
|
||
RUN yarn --frozen-lockfile --production=false | ||
# Install ALL dependencies | ||
RUN npm install | ||
|
||
COPY ./ ./ | ||
COPY . . | ||
|
||
RUN yarn build | ||
RUN npm run build | ||
|
||
# Switch to production after build | ||
ENV NODE_ENV="production" | ||
|
||
# Clean up development dependencies | ||
RUN npm prune --production | ||
|
||
EXPOSE 3000 | ||
CMD ["yarn", "start"] | ||
|
||
CMD ["npm", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.