-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
9 changed files
with
73 additions
and
89 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 |
---|---|---|
|
@@ -32,33 +32,23 @@ jobs: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
# - name: 환경변수 파일 생성 | ||
# run: echo "${{ secrets.APPLICATION_ENV }}" > ./.env | ||
# | ||
# - name: 환경변수 파일을 서버로 전송한다 | ||
# uses: appleboy/[email protected] | ||
# with: | ||
# host: ${{ secrets.HOST }} | ||
# username: ${{ secrets.USERNAME }} | ||
# key: ${{ secrets.PRIVATE_KEY }} | ||
# port: ${{ secrets.PORT }} | ||
# source: "./.env" | ||
# target: "./" | ||
|
||
# - name: ubuntu Docker image build and push | ||
# run: | | ||
# docker-compose -f ./docker/docker-compose.yml build | ||
# docker-compose -f ./docker/docker-compose.yml push | ||
- name: ubuntu Docker image build | ||
run: docker build -t ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:latest -f Dockerfile-server . | ||
|
||
- name: Redis Docker image build | ||
run: docker build -t ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:redis -f Dockerfile-redis . | ||
- name: 환경변수 파일 생성 | ||
run: echo "${{ secrets.APPLICATION_ENV }}" > ./.env | ||
|
||
- name: ubuntu docker Hub 푸쉬 | ||
run: docker push ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:latest | ||
- name: Redis docker Hub 푸쉬 | ||
run: docker push ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:redis | ||
- name: ubuntu Docker image build and push | ||
run: | | ||
docker-compose -f ./docker-compose.yml build~ | ||
docker-compose -f ./docker-compose.yml push | ||
# - name: ubuntu Docker image build | ||
# run: docker build -t ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:latest -f Dockerfile-server . | ||
# | ||
# - name: Redis Docker image build | ||
# run: docker build -t ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:redis -f Dockerfile-redis . | ||
# | ||
# - name: ubuntu docker Hub 푸쉬 | ||
# run: docker push ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:latest | ||
# - name: Redis docker Hub 푸쉬 | ||
# run: docker push ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:redis | ||
|
||
- name: Deploy with push | ||
uses: appleboy/[email protected] | ||
|
@@ -73,7 +63,7 @@ jobs: | |
sudo docker stop wswh-redis || true | ||
sudo docker container prune -f | ||
sudo docker pull ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:latest | ||
sudo docker run -d --log-driver=syslog --env-file .env \ | ||
sudo docker run -d --log-driver=syslog \ | ||
-p 8080:8080 --name we-share-wish-hair \ | ||
${{ secrets.DOCKER_NAME }}/we-share-wish-hair:latest | ||
sudo docker pull ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:redis | ||
|
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,28 @@ | ||
version: '3' | ||
services: | ||
server: | ||
image: openjdk:17-alpine | ||
restart: always | ||
env_file: | ||
- .env | ||
volumes: | ||
- ./build/libs:/home | ||
command: ["java", "-jar", | ||
"-Dspring.profiles.active=prod", | ||
"/home/advanced-we-share-wish-hair-0.0.1-SNAPSHOT.jar"] | ||
ports: | ||
- '8080:8080' | ||
platform: linux/amd64 | ||
networks: | ||
- my-net | ||
|
||
redis: | ||
image: redis:latest | ||
ports: | ||
- '6379:6379' | ||
platform: linux/amd64 | ||
networks: | ||
- my-net | ||
|
||
networks: | ||
my-net: |
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ server: | |
spring: | ||
data: | ||
redis: | ||
host: 3.21.14.25 | ||
host: localhost | ||
port: 6379 | ||
expire-time: 21600000 | ||
|
||
|
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 |
---|---|---|
|
@@ -11,9 +11,9 @@ spring: | |
|
||
datasource: | ||
driver-class-name: com.mysql.cj.jdbc.Driver | ||
url: jdbc:mysql://wswh-master-db.cgr8ovkfv2rw.us-east-2.rds.amazonaws.com/wswh_db | ||
username: admin | ||
password: dksk7946447 | ||
url: ${URL} | ||
username: ${USERNAME} | ||
password: ${PW} | ||
|
||
jpa: | ||
hibernate: | ||
|
@@ -30,8 +30,8 @@ spring: | |
mail: | ||
host: smtp.gmail.com | ||
port: 587 | ||
username: [email protected] | ||
password: qkvpxhpgyuywcbgh | ||
username: ${MAIL_USERNAME} | ||
password: ${MAIL_PW} | ||
protocol: smtp | ||
properties: | ||
mail: | ||
|
@@ -60,42 +60,23 @@ decorator: | |
|
||
#JWT key | ||
jwt: | ||
secret-key: abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc | ||
access-token-validity: 180000000 | ||
refresh-token-validity: 259200000 | ||
secret-key: ${JWT_KEY} | ||
access-token-validity: ${ACCESS_VALIDITY} | ||
refresh-token-validity: ${REFRESH_VALIDITY} | ||
|
||
# 네이버 클라우드 오브젝트 스토리지 | ||
cloud: | ||
aws: | ||
credentials: | ||
access-key: N3JCSJUtgse4alKEaOqX | ||
secret-key: rRamLrfUV8v6ZziJFEN4CVLjE9rl4kCBnEOLje5f | ||
access-key: ${S3_ACCESS_KEY} | ||
secret-key: ${S3_SECRET_KEY} | ||
stack: | ||
auto: false | ||
region: | ||
static: ap-northeast-2 | ||
s3: | ||
endpoint: https://kr.object.ncloudstorage.com | ||
bucket: wswh-storage | ||
bucket: ${S3_BUCKET} | ||
logging: | ||
level: | ||
root: info | ||
--- | ||
spring: | ||
config: | ||
activate: | ||
on-profile: dev | ||
|
||
datasource: | ||
master: | ||
hikari: | ||
username: root | ||
password: 1234 | ||
driver-class-name: com.mysql.cj.jdbc.Driver | ||
jdbc-url: jdbc:mysql://localhost:3306/db | ||
slave: | ||
hikari: | ||
username: root | ||
password: 1234 | ||
driver-class-name: com.mysql.cj.jdbc.Driver | ||
jdbc-url: jdbc:mysql://localhost:3307/db | ||
root: info |