File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9797
9898 - name : Deploy to EC2
9999 run : |
100- ssh -o StrictHostKeyChecking=no ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} "\
100+ mkdir -p ~/.ssh
101+ ssh-keyscan ${{ secrets.EC2_HOST }} >> ~/.ssh/known_hosts
102+ ssh ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} "\
101103 export WEBHOOK_SECRET='${{ secrets.WEBHOOK_SECRET }}' && \
102104 export GEMINI_API_KEY='${{ secrets.GEMINI_API_KEY }}' && \
103105 export API_TOKEN_GITHUB='${{ secrets.API_TOKEN_GITHUB }}' && \
Original file line number Diff line number Diff line change 11FROM eclipse-temurin:21-jdk
22
3+ # Create a non-root user and group
4+ RUN groupadd -r appgroup && useradd -r -g appgroup appuser
5+
6+ WORKDIR /app
7+
38ARG JAR_FILE=build/libs/*.jar
4- COPY ${JAR_FILE} app.jar
9+ COPY --chown=appuser:appgroup ${JAR_FILE} app.jar
10+
11+ USER appuser
512
6- ENTRYPOINT ["java" , "-jar" , "/ app.jar" ]
13+ ENTRYPOINT ["java" , "-jar" , "app.jar" ]
You can’t perform that action at this time.
0 commit comments