Skip to content

Commit

Permalink
Move to Fly.io
Browse files Browse the repository at this point in the history
  • Loading branch information
LitoMore committed May 25, 2024
1 parent 2c613cc commit 2aeb1de
Show file tree
Hide file tree
Showing 20 changed files with 465 additions and 6,235 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fly.toml
15 changes: 15 additions & 0 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Deno
on: [push]
jobs:
build:
runs-on: ubuntu-latest
name: Deno
steps:
- uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- run: deno --version
- run: |
deno lint
19 changes: 0 additions & 19 deletions .github/workflows/xo.yml

This file was deleted.

3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
node_modules
.vercel

4 changes: 0 additions & 4 deletions .vercelignore

This file was deleted.

4 changes: 0 additions & 4 deletions .xo-config.json

This file was deleted.

27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Based on https://github.com/denoland/deno_docker/blob/main/alpine.dockerfile

ARG DENO_VERSION=1.14.0
ARG BIN_IMAGE=denoland/deno:bin-${DENO_VERSION}
FROM ${BIN_IMAGE} AS bin

FROM frolvlad/alpine-glibc:alpine-3.13

RUN apk --no-cache add ca-certificates

RUN addgroup --gid 1000 deno \
&& adduser --uid 1000 --disabled-password deno --ingroup deno \
&& mkdir /deno-dir/ \
&& chown deno:deno /deno-dir/

ENV DENO_DIR /deno-dir/
ENV DENO_INSTALL_ROOT /usr/local

ARG DENO_VERSION
ENV DENO_VERSION=${DENO_VERSION}
COPY --from=bin /deno /bin/deno

WORKDIR /deno-dir
COPY . .

ENTRYPOINT ["/bin/deno"]
CMD ["run", "--allow-net", "https://deno.land/std/examples/echo_server.ts"]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 LitoMore
Copyright (c) LitoMore

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
<h1 align="center">simple-icons-cdn</h1>

<p align="center">
<a href="https://vercel.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://shields.io/badge/Powered_by_Vercel-white?logo=vercel&style=flat-square&logoColor=black" />
<source media="(prefers-color-scheme: light)" srcset="https://shields.io/badge/Powered_by_Vercel-black?logo=vercel&style=flat-square" />
<img src="https://shields.io/badge/Powered_by_Vercel-black?logo=vercel&style=flat-square" alt="Powered by Vercel" />
</picture>
</a>
</p>

## Disclaimer

We ask that all users read the [legal disclaimer](https://github.com/simple-icons/simple-icons/blob/develop/DISCLAIMER.md) before using icons from Simple Icons.
Expand Down
1 change: 0 additions & 1 deletion api/index.js

This file was deleted.

9 changes: 9 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"tasks": {
"update-lockfile": "deno cache --lock-write source/app.js source/colors.js source/icon.js source/utils.js",
"dev": "deno run --allow-net --watch source/app.js"
},
"imports": {
"@oak/oak": "jsr:@oak/oak@^16.0.0"
}
}
143 changes: 143 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# fly.toml app configuration file generated for simple-icons-cdn on 2024-05-19T12:17:55+08:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'simple-icons-cdn'
primary_region = 'hkg'

[build]

[env]
PORT = '8080'

[processes]
app = 'run --allow-net ./source/app.js'

[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = ['app']

[[vm]]
memory = '1gb'
cpu_kind = 'shared'
cpus = 1
Loading

0 comments on commit 2aeb1de

Please sign in to comment.