-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kuzu CI
committed
Oct 9, 2024
1 parent
0146f4e
commit 59ecb8f
Showing
5 changed files
with
87 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM nginx:stable | ||
COPY --chown=nginx:nginx ./releases /usr/share/nginx/html | ||
COPY --chown=nginx:nginx ./dataset /usr/share/nginx/html/dataset | ||
COPY nginx.conf /etc/nginx/nginx.conf | ||
RUN rm /usr/share/nginx/html/index.html /usr/share/nginx/html/50x.html |
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,6 @@ | ||
v0.1.0 | ||
v0.3.0 | ||
v0.3.1 | ||
v0.5.0 | ||
v0.5.1.3 | ||
vdev |
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 @@ | ||
version: '3' | ||
services: | ||
file-server: | ||
image: kuzudb/extension-repo | ||
pull_policy: always | ||
ports: | ||
- "8081:80" | ||
restart: always | ||
labels: | ||
- com.centurylinklabs.watchtower.enable=true |
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,32 @@ | ||
user nginx; | ||
worker_processes auto; | ||
|
||
error_log /var/log/nginx/error.log notice; | ||
pid /var/run/nginx.pid; | ||
|
||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
expires 15552000s; | ||
add_header Cache-Control "public, no-transform"; | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
autoindex on; | ||
sendfile on; | ||
#tcp_nopush on; | ||
|
||
keepalive_timeout 65; | ||
|
||
gzip on; | ||
|
||
include /etc/nginx/conf.d/*.conf; | ||
} |
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,34 @@ | ||
import pathlib | ||
import os | ||
from packaging.version import Version | ||
|
||
CURRENT_DIR = pathlib.Path(__file__).parent.resolve() | ||
|
||
RELEASES_PATH = CURRENT_DIR.joinpath('releases').resolve() | ||
|
||
production_releases = open(CURRENT_DIR.joinpath('PRODUCTION_RELEASES')).read().splitlines() | ||
|
||
releases_to_purge = [r for r in os.listdir(RELEASES_PATH) if r.startswith('v')] | ||
|
||
releases_to_purge = [r for r in releases_to_purge if r not in production_releases] | ||
releases_to_purge = [r[1:] for r in releases_to_purge] | ||
releases_to_purge.sort(key=Version) | ||
|
||
releases_to_purge.pop() | ||
|
||
releases_to_purge = ['v' + r for r in releases_to_purge] | ||
|
||
if len(releases_to_purge) == 0: | ||
print('No releases to purge.') | ||
exit(1) | ||
|
||
print('Releases to purge:') | ||
for r in releases_to_purge: | ||
print(' ' + r) | ||
|
||
for r in releases_to_purge: | ||
path_to_purge = RELEASES_PATH.joinpath(r) | ||
print('Deleting ' + str(path_to_purge)) | ||
os.system('rm -rf ' + str(path_to_purge)) | ||
|
||
print('Done.') |