-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
67f0400
commit 29d5cd4
Showing
6 changed files
with
99 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,3 @@ | ||
.git* | ||
README.md | ||
Dockerfile |
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,15 @@ | ||
name: CICD | ||
on: push | ||
jobs: | ||
cicd: | ||
runs-on: ubuntu-latest | ||
permissions: { contents: read, packages: write, id-token: write } | ||
steps: | ||
- uses: internetarchive/cicd@v1 | ||
with: | ||
BASE_DOMAIN: 'dev.archive.org' | ||
NOMAD_TOKEN: ${{ secrets.NOMAD_TOKEN }} | ||
REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NOMAD_VAR_HOSTNAMES: '["emularity-engine"]' | ||
NOMAD_VAR_COUNT: 1 | ||
NOMAD_VAR_PORTS: '{ 80 = "http" }' |
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 @@ | ||
*~ |
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,11 @@ | ||
FROM nginx:alpine | ||
|
||
WORKDIR /usr/share/nginx/html | ||
|
||
RUN rm -f index.html && \ | ||
# xxx not great for files that dont end like: .js.gz .wasm.gz | ||
sed -i 's/js;/js gz;/' /etc/nginx/mime.types | ||
|
||
COPY default.conf /etc/nginx/conf.d/ | ||
|
||
COPY . . |
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,22 @@ | ||
# IA S/W Emulation | ||
|
||
## example items | ||
- typical type of item: | ||
https://ia-petabox-csp.archive.org/details/gg_Star_Wars_1993LucasArts_Tiertex_Design_Studio_U.S._GoldUS | ||
|
||
- most challenging new `ruffle` type of item: | ||
https://ia-petabox-csp.archive.org/details/flash_loituma | ||
|
||
## current deployment | ||
- https://emularity-engine.dev.archive.org/ | ||
- https://emularity-engine.prod.archive.org/ | ||
|
||
## there are 3 related git repos & deployments: | ||
- https://github.com/internetarchive/emularity-engine | ||
- https://github.com/internetarchive/emularity-config | ||
- https://github.com/internetarchive/emularity-bios | ||
|
||
## prior archive.org source items with setup files: | ||
- https://archive.org/serve/emularity_engine_v1 | ||
- https://archive.org/serve/emularity_config_v1 | ||
- https://archive.org/serve/emularity_bios_v1 |
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,47 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
# enable gzip compression of simple text files when transmitting to clients | ||
# that can handle gzip/deflate responses. | ||
# do not gzip json files because range requests to .json files made by browser js | ||
# applications like archive.org/details/webshots-freeze-frame-index get whole object, | ||
# not the range | ||
gzip on; | ||
gzip_types "text/html; charset=utf-8" text/html text/plain text/javascript application/x-javascript application/javascript text/css text/csv text/xml application/xml; | ||
|
||
# add charset info to Content-Type header for text files | ||
# by default, will apply to files with the following mime types: | ||
# text/(plain|html|xml|vnd.wap.wml), application/(javascript|rss+xml) | ||
# if we wish to apply it to additional mime types (say, application/json), we can add a charset_types directive | ||
# see https://nginx.org/en/docs/http/ngx_http_charset_module.html for more details | ||
charset utf-8; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
|
||
# customizations: | ||
autoindex on; | ||
add_header Access-Control-Allow-Origin *; | ||
add_header Access-Control-Allow-Methods GET,POST,OPTIONS; | ||
add_header Access-Control-Allow-Headers Accept-Encoding,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,DNT,Pragma,Range,X-Requested-With; | ||
add_header Vary Origin; | ||
} | ||
|
||
# customization - like above but with `Content-Encoding` header | ||
location ~\.(js|wasm)\.gz$ { | ||
root /usr/share/nginx/html; | ||
add_header Access-Control-Allow-Origin *; | ||
add_header Access-Control-Allow-Methods GET,POST,OPTIONS; | ||
add_header Access-Control-Allow-Headers Accept-Encoding,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,DNT,Pragma,Range,X-Requested-With; | ||
add_header Vary Origin; | ||
|
||
add_header Content-Encoding gzip; | ||
} | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} |