Skip to content

Commit

Permalink
[수정] dockerfile 및 workflow 수정 (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
FacerAin committed Aug 1, 2023
2 parents a307e70 + a04f798 commit ba7188d
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 14 deletions.
104 changes: 104 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# This is a basic workflow to help you get started with Actions

name: update_helm_repo

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
pull_request:
types:
- closed
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
OCI_CLI_USER: ${{ secrets.OCI_CLI_USER }}
OCI_CLI_TENANCY: ${{ secrets.OCI_CLI_TENANCY }}
OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CLI_FINGERPRINT }}
OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CLI_KEY_CONTENT }}
OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }}
IMAGE_TAG: ${{ github.sha }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Get or create an OCIR Repository
uses: oracle-actions/get-ocir-repository@v1.2.1
id: get-ocir-repository
with:
name: terraform_canvas
compartment: ${{ secrets.OCI_COMPARTMENT_OCID }}
- name: Log into OCIR
uses: oracle-actions/login-ocir@v1.2.1
id: login-ocir
with:
auth_token: ${{ secrets.OCI_AUTH_TOKEN }}
- name: Tag and push a container image
id: tag-and-push-image
run: |
docker build -t "terraform_canvas:new-frontend" .
docker tag "terraform_canvas:new-frontend" "${{ steps.get-ocir-repository.outputs.repo_path }}:$IMAGE_TAG"
docker push "${{ steps.get-ocir-repository.outputs.repo_path }}:$IMAGE_TAG"
- name: update front.yaml
run: |
cat <<EOF> front.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "terraform-canvas.fullname" . }}-front
labels:
app: {{ include "terraform-canvas.name" . }}-front
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ include "terraform-canvas.name" . }}-front
template:
metadata:
labels:
app: {{ include "terraform-canvas.name" . }}-front
spec:
serviceAccountName: {{ include "terraform-canvas.serviceAccountName" . }}
containers:
- name: {{ .Chart.Name }}-front
image: ${{ steps.get-ocir-repository.outputs.repo_path }}:$IMAGE_TAG
ports:
- name: http
containerPort: {{ .Values.frontend.lb.http.targetPort}}
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: "front-service"
labels:
{{- include "terraform-canvas.labels" . | nindent 4 }}-front
spec:
type: {{ .Values.frontend.service.type }}
ports:
- name: http
port: {{ .Values.frontend.service.http.servicePort }}
targetPort: {{ .Values.frontend.service.http.targetPort }}
protocol: TCP
selector:
app: {{ include "terraform-canvas.name" . }}-front
EOF
- name: Pushes front image values file
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.TOKEN_GITHUB }}
with:
source_file: 'front.yaml'
destination_repo: 'Terraform-Canvas/canvas-helm/templates'
destination_folder: 'charts/terraform-canvas'
user_email: 'kdg97811@naver.com'
user_name: 'Eeap'
commit_message: "build: add img ${{ steps.get-ocir-repository.outputs.repo_path }}:$IMAGE_TAG"
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ RUN yarn run build
# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
RUN rm /etc/nginx/conf.d/default.conf
COPY ./nginx.conf /etc/nginx/conf.d
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
8 changes: 8 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
}
}
18 changes: 13 additions & 5 deletions src/components/aws/ResourceNodeCommon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,17 @@ const onRemove = () => {
variant="plain"
/>
</div>
<NodeResizer
line-style="visibility: hidden"
min-width="100"
min-height="30"
/>
<NodeResizer min-width="100" min-height="30" />
</template>

<style>
.vue-flow__resize-control.line {
opacity: 0;
}
.vue-flow__resize-control.handle {
opacity: 50%;
background-color: #252f3e !important;
height: 5px !important;
width: 5px !important;
}
</style>
18 changes: 9 additions & 9 deletions src/styles/nodeflow.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
content: '';
position: absolute;
top: -10px;
left: -1px;
left: 3px;
height: 10px;
width: 30%;
}
Expand Down Expand Up @@ -44,7 +44,7 @@
background: #2ca138;
position: absolute;
top: -10px;
left: -1px;
left: 3px;
height: 10px;
width: 30%;
}
Expand All @@ -61,7 +61,7 @@
background: #f68536;
position: absolute;
top: -10px;
left: -1px;
left: 3px;
height: 10px;
width: 30%;
}
Expand All @@ -78,7 +78,7 @@
background: #f68536;
position: absolute;
top: -10px;
left: -1px;
left: 3px;
height: 10px;
width: 30%;
}
Expand All @@ -96,7 +96,7 @@
background: #f68536;
position: absolute;
top: -10px;
left: -1px;
left: 3px;
height: 10px;
width: 30%;
}
Expand All @@ -113,7 +113,7 @@
background: #f68536;
position: absolute;
top: -10px;
left: -1px;
left: 3px;
height: 10px;
width: 30%;
}
Expand All @@ -130,7 +130,7 @@
background: #2ca138;
position: absolute;
top: -10px;
left: -1px;
left: 3px;
height: 10px;
width: 50px;
}
Expand All @@ -147,7 +147,7 @@
background: #2ca138;
position: absolute;
top: -10px;
left: -1px;
left: 3px;
height: 10px;
width: 50px;
}
Expand All @@ -164,7 +164,7 @@
background: #0d7317;
position: absolute;
top: -10px;
left: -1px;
left: 3px;
height: 10px;
width: 30%;
}

0 comments on commit ba7188d

Please sign in to comment.