-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BE] ci-cd 생성 단, aws내부에서cron설정을 하여야함
- Loading branch information
1 parent
fe70620
commit 9c067e9
Showing
6 changed files
with
63 additions
and
0 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
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,10 @@ | ||
FROM openjdk:17-jdk-slim | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update | ||
RUN apt-get -y install cron | ||
|
||
ADD build/cron-1.0-SNAPSHOT.jar cron.jar | ||
|
||
CMD tail -f /var/log/cron.log |
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,18 @@ | ||
version: 0.0 | ||
os: linux | ||
files: | ||
- source: / | ||
destination: /home/ec2-user/cron/zip/ | ||
overwrite: yes | ||
|
||
permissions: | ||
- object: / | ||
pattern: "**" | ||
owner: ec2-user | ||
group: ec2-user | ||
|
||
hooks: | ||
ApplicationStart: | ||
- location: deploy.sh | ||
timeout: 60 | ||
runas: ec2-user |
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,7 @@ | ||
#!/bin/bash | ||
|
||
mkdir -p /home/ec2-user/cron/zip | ||
cd /home/ec2-user/cron/zip/ | ||
|
||
docker compose down --rmi all | ||
docker compose up -d |
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,11 @@ | ||
version: "3.6" | ||
|
||
services: | ||
cabi-cron: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
container_name: "cabi-cron" | ||
image: "cabi/cron" | ||
volumes: | ||
- ./log:/var/log/ |
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,2 @@ | ||
* * 1 * * /usr/bin/java -jar /app/cron.jar get-ft-token &>> /var/log/cron.log | ||
|