File tree Expand file tree Collapse file tree 2 files changed +65
-0
lines changed Expand file tree Collapse file tree 2 files changed +65
-0
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ push :
3
+ branches : [ dev, main ]
4
+ pull_request :
5
+ branches : [ dev, main ]
6
+
7
+ name : AWS ECR push
8
+
9
+ jobs :
10
+ deploy :
11
+ name : Deploy
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - name : Checkout
16
+ uses : actions/checkout@v4
17
+
18
+ - name : Configure AWS credentials
19
+ uses : aws-actions/configure-aws-credentials@v4
20
+ with :
21
+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
22
+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
23
+ aws-region : eu-central-1
24
+
25
+ - name : Login to Amazon ECR
26
+ id : login-ecr
27
+ uses : aws-actions/amazon-ecr-login@v2
28
+
29
+ - name : Build, tag, and push the image to Amazon ECR
30
+ id : build-image
31
+ env :
32
+ ECR_REGISTRY : ${{ steps.login-ecr.outputs.registry }}
33
+ ECR_REPOSITORY : " lexic/prod/showvoc"
34
+ IMAGE_TAG : ${{ github.head_ref || github.ref_name }}
35
+
36
+ run : |
37
+ # Build a docker container and push it to ECR
38
+ docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
39
+ echo "Pushing image to ECR..."
40
+ docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
41
+ echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
Original file line number Diff line number Diff line change
1
+ FROM maven:3.5-alpine
2
+
3
+ # Make app directory
4
+ RUN mkdir -p /usr/src/app
5
+
6
+ # Set app directory as working directory
7
+ WORKDIR /usr/src/app
8
+
9
+ ARG SHOWVOC_VERSION=2.4.0
10
+
11
+ # Download VocBench, unzip, remove
12
+ RUN wget https://bitbucket.org/art-uniroma2/showvoc/downloads/showvoc-${SHOWVOC_VERSION}-full.zip && \
13
+ unzip ./showvoc-${SHOWVOC_VERSION}-full.zip && \
14
+ rm ./showvoc-${SHOWVOC_VERSION}-full.zip && \
15
+ mv semanticturkey-* semanticturkey
16
+
17
+ # Fix executable file permission
18
+ RUN chmod +x /usr/src/app/semanticturkey/bin/karaf
19
+
20
+ # Set container entrypoint on Karaf container script
21
+ ENTRYPOINT [ "/usr/src/app/semanticturkey/bin/karaf" , "server" ]
22
+
23
+ # Expose port 1979 (where ST runs by default)
24
+ EXPOSE 1979
You can’t perform that action at this time.
0 commit comments