Skip to content

Commit

Permalink
[FIX] revise readinessprobe and livenessprobe
Browse files Browse the repository at this point in the history
  • Loading branch information
CokeLee777 committed Jan 16, 2024
1 parent 53d09c6 commit d7b1969
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 29 deletions.
8 changes: 4 additions & 4 deletions deployment-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ spec:
httpGet:
path: /actuator/health/readiness
port: 8085
initialDelaySeconds: 240
initialDelaySeconds: 120
periodSeconds: 30
timeoutSeconds: 2
# 애플리케이션이 정상 상태를 유지하고 있는지 지속해서 검사
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: 8085
initialDelaySeconds: 240
initialDelaySeconds: 120
periodSeconds: 30
timeoutSeconds: 2
# SIGTERM을 받아도 바로 종료되지 않고 180초 뒤에 종료
terminationGracePeriodSeconds: 420
# SIGTERM을 받아도 바로 종료되지 않고 일정 시간 뒤에 종료
terminationGracePeriodSeconds: 60
restartPolicy: Always
affinity:
nodeAffinity:
Expand Down
52 changes: 27 additions & 25 deletions src/main/resources/data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ VALUES ('Brand1', NOW(), NOW()),

INSERT INTO category (master_category_id, name, created_at, updated_at)
VALUES (NULL, 'RootCategory1', NOW(), NOW()),
(NULL, 'RootCategory2', NOW(), NOW());
(NULL, 'RootCategory2', NOW(), NOW()),
(NULL, 'RootCategory3', NOW(), NOW());

INSERT INTO category (master_category_id, name, created_at, updated_at)
VALUES (1, 'Subcategory1-1', NOW(), NOW()),
VALUES (1, 'SubCategory1-1asdasdasdasdad', NOW(), NOW()),
(1, 'Subcategory1-2', NOW(), NOW()),
(2, 'Subcategory2-1', NOW(), NOW()),
(2, 'Subcategory2-2', NOW(), NOW());
(2, 'Subcategory2-2', NOW(), NOW()),
(3, 'Subcategory3-1', NOW(), NOW()),
(3, 'Subcategory3-2', NOW(), NOW());

INSERT INTO product_size (category_id, name, created_at, updated_at)
VALUES (3, 'Size1', NOW(), NOW()),
Expand All @@ -26,17 +29,17 @@ VALUES (3, 'Size1', NOW(), NOW()),
(6, 'Size2', NOW(), NOW());

INSERT INTO product (brand_id, category_id, name, code, img_url, price, gender, type, created_at, updated_at)
VALUES (1, 3, 'Product1', 'P001', '/product-img/default-product-img.png', 100000, 'COMMON', 'NORMAL', NOW(), NOW()),
(2, 3, 'Product2', 'P002', '/product-img/default-product-img.png', 150000, 'MALE', 'NORMAL', NOW(), NOW()),
(3, 3, 'Product3', 'P003', '/product-img/default-product-img.png', 200000, 'FEMALE', 'NORMAL', NOW(), NOW()),
(4, 4, 'Product4', 'P004', '/product-img/default-product-img.png', 120000, 'COMMON', 'NORMAL', NOW(), NOW()),
(5, 4, 'Product5', 'P005', '/product-img/default-product-img.png', 180000, 'MALE', 'NORMAL', NOW(), NOW()),
(1, 4, 'Product6', 'P006', '/product-img/default-product-img.png', 130000, 'FEMALE', 'NORMAL', NOW(), NOW()),
(2, 5, 'Product7', 'P007', '/product-img/default-product-img.png', 90000, 'COMMON', 'NORMAL', NOW(), NOW()),
(3, 5, 'Product8', 'P008', '/product-img/default-product-img.png', 160000, 'MALE', 'NORMAL', NOW(), NOW()),
(4, 6, 'Product9', 'P009', '/product-img/default-product-img.png', 220000, 'FEMALE', 'NORMAL', NOW(), NOW()),
(5, 6, 'Product10', 'P010', '/product-img/default-product-img.png', 110000, 'COMMON', 'NORMAL', NOW(), NOW()),
(5, 6, 'AuctionProduct', 'P011', '/product-img/default-product-img.png', 2000000, 'COMMON', 'AUCTION', NOW(), NOW());
VALUES (1, 3, 'Product1testestestestestsetestsetset', 'P001', '/product-img/7ca72775-fa3c-49ef-8e62-34d1e2b67f30.avif', 100000, 'COMMON', 'NORMAL', NOW(), NOW()),
(2, 3, 'Product2testestestestestsetestsetset', 'P002', '/product-img/deec2081-a85a-4cb5-871e-9dc26b37f775.jpg', 150000, 'MALE', 'NORMAL', NOW(), NOW()),
(3, 3, 'Product3', 'P003', '/product-img/7ca72775-fa3c-49ef-8e62-34d1e2b67f30.avif', 200000, 'FEMALE', 'NORMAL', NOW(), NOW()),
(4, 4, 'Product4', 'P004', '/product-img/deec2081-a85a-4cb5-871e-9dc26b37f775.jpg', 120000, 'COMMON', 'NORMAL', NOW(), NOW()),
(5, 4, 'Product5', 'P005', '/product-img/7ca72775-fa3c-49ef-8e62-34d1e2b67f30.avif', 180000, 'MALE', 'NORMAL', NOW(), NOW()),
(1, 4, 'Product6', 'P006', '/product-img/deec2081-a85a-4cb5-871e-9dc26b37f775.jpg', 130000, 'FEMALE', 'NORMAL', NOW(), NOW()),
(2, 5, 'Product7', 'P007', '/product-img/deec2081-a85a-4cb5-871e-9dc26b37f775.jpg', 90000, 'COMMON', 'NORMAL', NOW(), NOW()),
(3, 5, 'Product8', 'P008', '/product-img/deec2081-a85a-4cb5-871e-9dc26b37f775.jpg', 160000, 'MALE', 'NORMAL', NOW(), NOW()),
(4, 6, 'Product9', 'P009', '/product-img/deec2081-a85a-4cb5-871e-9dc26b37f775.jpg', 220000, 'FEMALE', 'NORMAL', NOW(), NOW()),
(5, 6, 'Product10', 'P010', '/product-img/deec2081-a85a-4cb5-871e-9dc26b37f775.jpg', 110000, 'COMMON', 'NORMAL', NOW(), NOW());
>>>>>>> Stashed changes

INSERT INTO product_stock (product_id, product_size_id, quantity)
VALUES (1, 1, 50), (2, 2, 30), (3, 1, 40), (4, 4, 25), (5, 3, 35),
Expand All @@ -46,17 +49,16 @@ VALUES (1, 1, 50), (2, 2, 30), (3, 1, 40), (4, 4, 25), (5, 3, 35),
(11, 7, 10);

INSERT INTO describe_image (product_id, img_url)
VALUES (1, '/product-img/default-product-img.png'),
(2, '/product-img/default-product-img.png'),
(3, '/product-img/default-product-img.png'),
(4, '/product-img/default-product-img.png'),
(5, '/product-img/default-product-img.png'),
(6, '/product-img/default-product-img.png'),
(7, '/product-img/default-product-img.png'),
(8, '/product-img/default-product-img.png'),
(9, '/product-img/default-product-img.png'),
(10, '/product-img/default-product-img.png'),
(11, '/product-img/default-product-img.png');
VALUES (1, '/product-img/7ca72775-fa3c-49ef-8e62-34d1e2b67f30.avif'),
(2, '/product-img/deec2081-a85a-4cb5-871e-9dc26b37f775.jpg'),
(3, '/product-img/7ca72775-fa3c-49ef-8e62-34d1e2b67f30.avif'),
(4, '/product-img/deec2081-a85a-4cb5-871e-9dc26b37f775.jpg'),
(5, '/product-img/7ca72775-fa3c-49ef-8e62-34d1e2b67f30.avif'),
(6, '/product-img/deec2081-a85a-4cb5-871e-9dc26b37f775.jpg'),
(7, '/product-img/7ca72775-fa3c-49ef-8e62-34d1e2b67f30.avif'),
(8, '/product-img/deec2081-a85a-4cb5-871e-9dc26b37f775.jpg'),
(9, '/product-img/7ca72775-fa3c-49ef-8e62-34d1e2b67f30.avif'),
(10, '/product-img/deec2081-a85a-4cb5-871e-9dc26b37f775.jpg');

INSERT INTO review_aggregate (product_id, avg_rating, review_count)
VALUES (1, 0, 0), (2, 0, 0),
Expand Down

0 comments on commit d7b1969

Please sign in to comment.