chore: build
This commit is contained in:
@@ -30,3 +30,6 @@ PRIVATE_KEY_MOBILE_PREPROD=LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUV2Z0lCQURBT
|
||||
ADMIN_PASSWORD_MOBILE_PREPROD=thxz419zFmNdh547A3vrQE1v
|
||||
UPLOAD_KEY_MOBILE_PREPROD=8f65a01120509b149f3a781b139391272519041b
|
||||
POSTGRES_PASS_MOBILE_PREPROD=uS6K8V54JeUHOYsbEDdbIt
|
||||
|
||||
RUSTFS_ACCESS_KEY=iBacJPHUHSf6SMTnxrr
|
||||
RUSTFS_SECRET_KEY=4jNzZhstv1WkwTwtvR4gHSbrx01m4sJl4LBBleeJ
|
||||
|
||||
@@ -168,6 +168,33 @@ services:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
rustfs_perm:
|
||||
image: alpine:latest
|
||||
container_name: rustfs_perm
|
||||
volumes:
|
||||
- /mnt/data:/data
|
||||
command: chown -R 10001:10001 /data
|
||||
|
||||
rustfs:
|
||||
image: rustfs/rustfs:latest
|
||||
depends_on:
|
||||
rustfs_perm:
|
||||
condition: service_completed_successfully
|
||||
hostname: rustfs
|
||||
container_name: rustfs
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /mnt/data:/data
|
||||
- /mnt/logs:/logs
|
||||
environment:
|
||||
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY:-iBacJPHUHSf6SMTnxrr}
|
||||
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY:-4jNzZhstv1WkwTwtvR4gHSbrx01m4sJl4LBBleeJ}
|
||||
- RUSTFS_SERVER_DOMAINS=rustfs.uber-stup.club
|
||||
- RUSTFS_CONSOLE_ENABLE=true
|
||||
- RUSTFS_ADDRESS=:9000
|
||||
- RUSTFS_CONSOLE_ADDRESS=:9001
|
||||
networks:
|
||||
- ota-net
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: ota-nginx
|
||||
@@ -188,6 +215,7 @@ services:
|
||||
- ota-omnex-admin
|
||||
- ota-mobile-prod
|
||||
- ota-mobile-preprod
|
||||
- rustfs
|
||||
|
||||
dozzle-agent:
|
||||
image: amir20/dozzle:latest
|
||||
@@ -210,3 +238,4 @@ volumes:
|
||||
ota_mobile_prod_releases:
|
||||
ota_mobile_preprod_releases:
|
||||
certbot_www:
|
||||
rustfs:
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
CREATE TABLE IF NOT EXISTS releases (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
runtime_version VARCHAR(255) NOT NULL,
|
||||
path VARCHAR(255) NOT NULL,
|
||||
timestamp TIMESTAMP NOT NULL,
|
||||
commit_hash VARCHAR(255) NOT NULL,
|
||||
commit_message VARCHAR(255) NOT NULL,
|
||||
update_id VARCHAR(255)
|
||||
);
|
||||
@@ -0,0 +1,14 @@
|
||||
CREATE TABLE IF NOT EXISTS releases_tracking (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
release_id UUID NOT NULL REFERENCES releases(id),
|
||||
download_timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
platform VARCHAR(50) NOT NULL,
|
||||
CONSTRAINT fk_release
|
||||
FOREIGN KEY(release_id)
|
||||
REFERENCES releases(id)
|
||||
ON DELETE CASCADE
|
||||
);
|
||||
|
||||
-- Index for faster queries on release_id and timestamp
|
||||
CREATE INDEX idx_tracking_release_id ON releases_tracking(release_id);
|
||||
CREATE INDEX idx_tracking_platform ON releases_tracking(platform);
|
||||
@@ -166,3 +166,61 @@ server {
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
http2 on;
|
||||
server_name backup-omnex.uber-stup.club;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/backup-omnex.uber-stup.club.crt;
|
||||
ssl_certificate_key /etc/nginx/certs/backup-omnex.uber-stup.club.key;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
access_log /var/log/nginx/rustfs_access.log;
|
||||
error_log /var/log/nginx/rustfs_error.log;
|
||||
|
||||
resolver 127.0.0.11 valid=30s;
|
||||
|
||||
location / {
|
||||
set $upstream http://rustfs:9001;
|
||||
proxy_pass $upstream;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_read_timeout 300s;
|
||||
client_max_body_size 500m;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name backup-s3.uber-stup.club;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/backup-s3.uber-stup.club.crt;
|
||||
ssl_certificate_key /etc/nginx/certs/backup-s3.uber-stup.club.key;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
access_log /var/log/nginx/rustfs_s3_access.log;
|
||||
error_log /var/log/nginx/rustfs_s3_error.log;
|
||||
|
||||
resolver 127.0.0.11 valid=30s;
|
||||
|
||||
location / {
|
||||
set $upstream http://rustfs:9000;
|
||||
proxy_pass $upstream;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_read_timeout 300s;
|
||||
client_max_body_size 2g;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ docker run --rm \
|
||||
certbot/certbot renew --webroot -w /var/www/certbot --quiet
|
||||
|
||||
changed=0
|
||||
for sub in ota-prod ota-preprod ota-omnex-cli ota-omnex-admin ota-mobile-prod ota-mobile-preprod; do
|
||||
for sub in ota-prod ota-preprod ota-omnex-cli ota-omnex-admin ota-mobile-prod ota-mobile-preprod backup-omnex backup-s3; do
|
||||
domain="${sub}.uber-stup.club"
|
||||
if ! docker run --rm -v ota_certbot_letsencrypt:/etc/letsencrypt -v /opt/ota/certs:/out alpine \
|
||||
sh -c "cmp -s /etc/letsencrypt/live/${domain}/fullchain.pem /out/${domain}.crt"; then
|
||||
|
||||
Reference in New Issue
Block a user