Merge pull request #6011 from titouv/v4.x
feat(service): add cap service
This commit is contained in:
commit
074436e7d8
2 changed files with 103 additions and 0 deletions
28
public/svgs/cap.svg
Normal file
28
public/svgs/cap.svg
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<svg width="1313" height="491" viewBox="0 0 1313 491" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M866.989 285.729C861.288 315.455 848.331 339.107 828.117 356.686C808.163 374.005 782.248 382.665 750.375 382.665C724.201 382.665 701.266 376.461 681.571 364.053C662.135 351.386 647.106 334.197 636.48 312.482C625.855 290.769 620.543 266.341 620.543 239.199C620.543 212.057 625.726 187.501 636.091 165.529C646.717 143.556 661.876 126.367 681.571 113.958C701.266 101.292 724.201 94.959 750.375 94.959C780.694 94.959 805.831 103.231 825.785 119.775C845.74 136.318 858.956 158.679 865.435 186.854L814.513 189.568C810.625 173.542 803.11 161.005 791.967 151.957C780.824 142.651 766.83 137.998 749.986 137.998C732.363 137.998 717.592 142.393 705.672 151.182C694.011 159.97 685.329 172.119 679.628 187.63C673.927 202.881 671.076 220.07 671.076 239.199C671.076 258.328 673.927 275.39 679.628 290.382C685.329 305.375 694.011 317.395 705.672 326.441C717.592 335.231 732.363 339.624 749.986 339.624C767.608 339.624 781.991 334.584 793.134 324.504C804.535 314.164 812.051 300.333 815.68 283.014L866.989 285.729Z" fill="#0A486B"/>
|
||||
<path d="M888.669 233.385C892.816 212.188 902.792 195.773 918.601 184.142C934.408 172.251 954.752 166.305 979.629 166.305C1009.17 166.305 1031.59 173.803 1046.88 188.796C1062.17 203.788 1069.81 225.631 1069.81 254.323V326.056C1069.81 331.485 1070.85 335.362 1072.92 337.689C1075.25 339.756 1078.49 340.789 1082.64 340.789H1090.41V376.463L1078.36 376.85H1076.81C1069.81 377.11 1062.68 376.591 1055.43 375.3C1048.43 374.007 1042.21 371.034 1036.77 366.381C1031.33 361.728 1028.22 354.619 1027.44 345.055C1022.26 355.654 1013.84 364.314 1002.17 371.034C990.513 377.754 976.26 381.116 959.416 381.116C938.167 381.116 920.415 375.817 906.162 365.218C892.168 354.361 885.172 340.145 885.172 322.566C885.172 309.641 888.15 299.171 894.111 291.158C900.331 283.145 908.883 276.812 919.766 272.159C930.909 267.506 945.422 263.5 963.304 260.139L1021.22 248.507C1020.96 232.738 1017.46 221.107 1010.73 213.611C1003.99 205.855 993.623 201.978 979.629 201.978C968.745 201.978 959.675 204.951 952.42 210.896C945.422 216.582 940.628 224.984 938.037 236.1L888.669 233.385ZM934.927 321.016C934.927 328.512 938.037 334.716 944.255 339.626C950.734 344.279 959.934 346.606 971.855 346.606C981.443 346.606 989.995 344.279 997.509 339.626C1005.28 334.975 1011.25 327.995 1015.39 318.689C1019.8 309.124 1022 297.621 1022 284.179V282.241L982.35 289.221L975.352 290.384C965.765 292.194 958.249 294.002 952.807 295.811C947.624 297.621 943.349 300.594 939.98 304.73C936.611 308.607 934.927 314.036 934.927 321.016Z" fill="#0A486B"/>
|
||||
<path d="M1115.57 170.958H1161.05L1162.61 213.998L1158.72 208.958C1163.91 195.256 1172.07 184.787 1183.21 177.55C1194.61 170.054 1208.35 166.305 1224.41 166.305C1243.59 166.305 1259.79 171.087 1273 180.653C1286.22 190.216 1296.07 203.142 1302.55 219.427C1309.28 235.454 1312.65 253.547 1312.65 273.711C1312.65 293.874 1309.28 312.097 1302.55 328.383C1296.07 344.409 1286.22 357.205 1273 366.768C1259.79 376.334 1243.59 381.116 1224.41 381.116C1213.79 381.116 1204.07 379.436 1195.26 376.074C1186.71 372.714 1179.32 367.804 1173.11 361.341C1167.14 354.878 1162.48 346.865 1159.11 337.3L1163.78 333.423V434.624H1115.57V170.958ZM1159.89 273.711C1159.89 286.118 1161.7 297.491 1165.33 307.831C1169.22 317.913 1175.05 326.056 1182.82 332.259C1190.6 338.463 1200.06 341.565 1211.2 341.565C1228.04 341.565 1240.74 335.103 1249.29 322.179C1258.1 309.254 1262.51 293.098 1262.51 273.711C1262.51 254.582 1258.1 238.427 1249.29 225.242C1240.74 212.059 1228.04 205.468 1211.2 205.468C1200.06 205.468 1190.6 208.699 1182.82 215.161C1175.05 221.365 1169.22 229.637 1165.33 239.977C1161.7 250.059 1159.89 261.303 1159.89 273.711Z" fill="#0A486B"/>
|
||||
<path d="M399.238 0H91.3073C40.8797 0 0 40.8797 0 91.3073V399.238C0 449.665 40.8797 490.545 91.3073 490.545H399.238C449.665 490.545 490.545 449.665 490.545 399.238V91.3073C490.545 40.8797 449.665 0 399.238 0Z" fill="url(#paint0_linear_4636_5)"/>
|
||||
<path d="M245.882 439.039C352.557 439.039 439.034 352.562 439.034 245.888C439.034 139.213 352.557 52.7363 245.882 52.7363C139.207 52.7363 52.7305 139.213 52.7305 245.888C52.7305 352.562 139.207 439.039 245.882 439.039Z" fill="url(#paint1_radial_4636_5)"/>
|
||||
<path d="M246.5 410.833C337.259 410.833 410.833 337.259 410.833 246.5C410.833 155.742 337.259 82.168 246.5 82.168C155.742 82.168 82.168 155.742 82.168 246.5C82.168 337.259 155.742 410.833 246.5 410.833Z" fill="url(#paint2_linear_4636_5)"/>
|
||||
<path d="M246.499 370.36C314.906 370.36 370.362 314.904 370.362 246.497C370.362 178.09 314.906 122.635 246.499 122.635C178.092 122.635 122.637 178.09 122.637 246.497C122.637 314.904 178.092 370.36 246.499 370.36Z" fill="url(#paint3_radial_4636_5)"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_4636_5" x1="245.272" y1="0" x2="245.272" y2="490.545" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A8DBF8"/>
|
||||
<stop offset="1" stop-color="#BCCBFF"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint1_radial_4636_5" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(245.882 178.974) rotate(107.38) scale(272.507 272.507)">
|
||||
<stop offset="0.0625" stop-color="#84D3FF"/>
|
||||
<stop offset="0.411458" stop-color="#17ABFE"/>
|
||||
<stop offset="0.90625" stop-color="#0770D1"/>
|
||||
</radialGradient>
|
||||
<linearGradient id="paint2_linear_4636_5" x1="246.5" y1="82.1672" x2="246.5" y2="410.832" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#BBE8FF"/>
|
||||
<stop offset="1" stop-color="#018FEF"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint3_radial_4636_5" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(265.197 246.497) rotate(98.5836) scale(125.265 125.265)">
|
||||
<stop stop-color="#7EC3FF"/>
|
||||
<stop offset="1" stop-color="#EAF5FF"/>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.7 KiB |
75
templates/compose/cap.yaml
Normal file
75
templates/compose/cap.yaml
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
# documentation: https://cap.so
|
||||
# slogan: Cap is the open source alternative to Loom. Lightweight, powerful, and cross-platform. Record and share in seconds.
|
||||
# tags: cap,loom,open,source,low,code
|
||||
# logo: svgs/cap.svg
|
||||
# port: 5679
|
||||
|
||||
# Storage Configuration:
|
||||
# Option 1: Remote S3-compatible storage (AWS S3, Cloudflare R2, etc.)
|
||||
# Set these environment variables:
|
||||
# - CAP_AWS_ACCESS_KEY: Your S3/R2 access key
|
||||
# - CAP_AWS_SECRET_KEY: Your S3/R2 secret key
|
||||
# - CAP_AWS_BUCKET: Your S3/R2 bucket name
|
||||
# - CAP_AWS_REGION: Your S3/R2 region (e.g., us-east-1, auto for R2)
|
||||
# - CAP_AWS_ENDPOINT: Your S3/R2 endpoint URL
|
||||
# - S3_PUBLIC_ENDPOINT: Public endpoint for your bucket (same as CAP_AWS_ENDPOINT for most cases)
|
||||
# - S3_INTERNAL_ENDPOINT: Internal endpoint (same as CAP_AWS_ENDPOINT for most cases)
|
||||
# - S3_PATH_STYLE: true for R2/most S3-compatible, false for AWS S3 virtual-hosted style
|
||||
#
|
||||
# Option 2: Local MinIO storage
|
||||
# Deploy MinIO as a separate service in the same network and set:
|
||||
# - CAP_AWS_ACCESS_KEY: MinIO root user
|
||||
# - CAP_AWS_SECRET_KEY: MinIO root password
|
||||
# - CAP_AWS_BUCKET: Your bucket name (e.g., capso)
|
||||
# - CAP_AWS_REGION: us-east-1 (or any region)
|
||||
# - CAP_AWS_ENDPOINT: http://minio:9000 (internal MinIO endpoint)
|
||||
# - S3_PUBLIC_ENDPOINT: http://your-minio-domain:9000 (public MinIO endpoint)
|
||||
# - S3_INTERNAL_ENDPOINT: http://minio:9000 (internal MinIO endpoint)
|
||||
# - S3_PATH_STYLE: true
|
||||
|
||||
services:
|
||||
cap-web:
|
||||
image: 'ghcr.io/capsoftware/cap-web:latest'
|
||||
environment:
|
||||
- SERVICE_URL_CAP_3000
|
||||
- 'DATABASE_URL=mysql://$SERVICE_USER_MYSQL:$SERVICE_PASSWORD_MYSQL@cap-db:3306/${MYSQL_DATABASE:-planetscale}'
|
||||
- 'WEB_URL=${SERVICE_URL_CAP}'
|
||||
- 'NEXTAUTH_URL=${SERVICE_URL_CAP}'
|
||||
- 'DATABASE_ENCRYPTION_KEY=${SERVICE_PASSWORD_64_DATABASEENCRYPTIONKEY}'
|
||||
- 'NEXTAUTH_SECRET=${SERVICE_PASSWORD_64_NEXTAUTHSECRET}'
|
||||
- 'CAP_AWS_ACCESS_KEY=${CAP_AWS_ACCESS_KEY:?}'
|
||||
- 'CAP_AWS_SECRET_KEY=${CAP_AWS_SECRET_KEY:?}'
|
||||
- 'CAP_AWS_BUCKET=${CAP_AWS_BUCKET:?}'
|
||||
- 'CAP_AWS_REGION=${CAP_AWS_REGION:?}'
|
||||
- 'S3_PUBLIC_ENDPOINT=${S3_PUBLIC_ENDPOINT:?}'
|
||||
- 'S3_INTERNAL_ENDPOINT=${S3_INTERNAL_ENDPOINT:?}'
|
||||
- 'NEXT_RUNTIME=nodejs'
|
||||
- 'S3_PATH_STYLE=${S3_PATH_STYLE:-true}'
|
||||
- 'CAP_AWS_ENDPOINT=${CAP_AWS_ENDPOINT:?}'
|
||||
depends_on:
|
||||
cap-db:
|
||||
condition: service_healthy
|
||||
|
||||
cap-db:
|
||||
image: 'mysql:8.0'
|
||||
environment:
|
||||
- 'MYSQL_USER=${SERVICE_USER_MYSQL}'
|
||||
- 'MYSQL_PASSWORD=${SERVICE_PASSWORD_MYSQL}'
|
||||
- 'MYSQL_DATABASE=${MYSQL_DATABASE:-planetscale}'
|
||||
- 'MYSQL_ROOT_PASSWORD=${SERVICE_PASSWORD_MYSQLROOT}'
|
||||
- 'MYSQL_ALLOW_EMPTY_PASSWORD=${MYSQL_ALLOW_EMPTY_PASSWORD:-yes}'
|
||||
command:
|
||||
- '--max_connections=1000'
|
||||
- '--default-authentication-plugin=mysql_native_password'
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- mysqladmin
|
||||
- ping
|
||||
- '-h'
|
||||
- 127.0.0.1
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
volumes:
|
||||
- 'cap_db:/var/lib/mysql'
|
||||
Loading…
Reference in a new issue