Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployments #10

Merged
merged 32 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
82cf86e
Update docker
MotorTruck1221 Aug 12, 2023
4390faf
English
MotorTruck1221 Aug 12, 2023
8475a34
Testing
MotorTruck1221 Aug 12, 2023
217c789
Merge pull request #9 from Ruby-Network/main
MotorTruck1221 Aug 14, 2023
1169eb1
Docker now allows the ability to use the config
MotorTruck1221 Aug 14, 2023
55f8042
no
MotorTruck1221 Aug 14, 2023
e3481a5
idk
MotorTruck1221 Aug 14, 2023
391f68d
add render
MotorTruck1221 Aug 14, 2023
c209415
force 18 or above
MotorTruck1221 Aug 14, 2023
e9cba07
lets see
MotorTruck1221 Aug 14, 2023
decd354
test
MotorTruck1221 Aug 14, 2023
401afa2
?
MotorTruck1221 Aug 14, 2023
f37c857
specify
MotorTruck1221 Aug 14, 2023
08e2c4c
this should work now
MotorTruck1221 Aug 14, 2023
88f5e47
forgot about settings.yml
MotorTruck1221 Aug 14, 2023
8d0cf63
aughgh
MotorTruck1221 Aug 14, 2023
ab758ac
lets try that
MotorTruck1221 Aug 14, 2023
d052e46
remove npm run build from install
MotorTruck1221 Aug 14, 2023
32a895c
update dockerfile
MotorTruck1221 Aug 14, 2023
bda12c4
you have got to be kidding me
MotorTruck1221 Aug 14, 2023
a6b244d
stupid CI
MotorTruck1221 Aug 14, 2023
9b4329f
CI
MotorTruck1221 Aug 14, 2023
483f3b8
SUBMODULES!
MotorTruck1221 Aug 14, 2023
d6891a7
AUGHGH
MotorTruck1221 Aug 14, 2023
e9af427
e
MotorTruck1221 Aug 14, 2023
03cac84
try this render
MotorTruck1221 Aug 14, 2023
1305af6
try this render
MotorTruck1221 Aug 14, 2023
68b8cb6
Render can come later
MotorTruck1221 Aug 14, 2023
587034f
Gitpod?
MotorTruck1221 Aug 14, 2023
1983189
Too limiting
MotorTruck1221 Aug 14, 2023
609cd61
Replit
MotorTruck1221 Aug 14, 2023
0b6635c
Replit doesn't work :skull:
MotorTruck1221 Aug 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Submodule Update
run: git submodule update --init --recursive
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
- name: Login To registry ${{ env.REGISTRY }}
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.GH_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
node_modules/
package-lock.json
yarn.lock
Gemfile.lock
.env
settings.yml
.bundle/
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

source "https://rubygems.org"

ruby ">= 3.0.0"
gem "sinatra"
gem "sinatra-contrib"
gem "puma"
Expand Down
105 changes: 105 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
GEM
remote: https://rubygems.org/
specs:
colorize (1.1.0)
concurrent-ruby (1.2.2)
config (4.2.1)
deep_merge (~> 1.2, >= 1.2.1)
dry-validation (~> 1.0, >= 1.0.0)
deep_merge (1.2.2)
dry-configurable (1.1.0)
dry-core (~> 1.0, < 2)
zeitwerk (~> 2.6)
dry-core (1.0.1)
concurrent-ruby (~> 1.0)
zeitwerk (~> 2.6)
dry-inflector (1.0.0)
dry-initializer (3.1.1)
dry-logic (1.5.0)
concurrent-ruby (~> 1.0)
dry-core (~> 1.0, < 2)
zeitwerk (~> 2.6)
dry-schema (1.13.2)
concurrent-ruby (~> 1.0)
dry-configurable (~> 1.0, >= 1.0.1)
dry-core (~> 1.0, < 2)
dry-initializer (~> 3.0)
dry-logic (>= 1.4, < 2)
dry-types (>= 1.7, < 2)
zeitwerk (~> 2.6)
dry-types (1.7.1)
concurrent-ruby (~> 1.0)
dry-core (~> 1.0)
dry-inflector (~> 1.0)
dry-logic (~> 1.4)
zeitwerk (~> 2.6)
dry-validation (1.10.0)
concurrent-ruby (~> 1.0)
dry-core (~> 1.0, < 2)
dry-initializer (~> 3.0)
dry-schema (>= 1.12, < 2)
zeitwerk (~> 2.6)
encrypted_cookie (0.1.0)
rack (>= 1.1, < 3)
ffi (1.15.5)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
multi_json (1.15.0)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
nio4r (2.5.9)
os (1.1.4)
puma (6.3.0)
nio4r (~> 2.0)
rack (2.2.8)
rack-protection (3.1.0)
rack (~> 2.2, >= 2.2.4)
rack-proxy (0.7.6)
rack
rack-reverse-proxy (0.12.0)
rack (>= 1.0.0)
rack-proxy (~> 0.6, >= 0.6.1)
rack_csrf (2.7.0)
rack (>= 1.1.0)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rerun (0.14.0)
listen (~> 3.0)
ruby2_keywords (0.0.5)
sinatra (3.1.0)
mustermann (~> 3.0)
rack (~> 2.2, >= 2.2.4)
rack-protection (= 3.1.0)
tilt (~> 2.0)
sinatra-contrib (3.1.0)
multi_json
mustermann (~> 3.0)
rack-protection (= 3.1.0)
sinatra (= 3.1.0)
tilt (~> 2.0)
tilt (2.2.0)
yaml (0.2.1)
zeitwerk (2.6.11)

PLATFORMS
x86_64-linux

DEPENDENCIES
colorize
config
dry-schema
dry-validation
encrypted_cookie
os
puma
rack-reverse-proxy
rack_csrf
rerun
sinatra
sinatra-contrib
yaml

BUNDLED WITH
2.4.13
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@
src="https://raw.githubusercontent.com/BinBashBanana/deploy-buttons/main/buttons/remade/render.svg"
/>
</a>
</a>
<a href="https://railway.app/new/template/hnVkIQ">
<img
height="30px"
src="https://raw.githubusercontent.com/BinBashBanana/deploy-buttons/main/buttons/remade/railway.svg"
/>
</a>
<a href="https://glitch.com/edit/#!/import/github/Ruby-Network/ruby">
<img height="30px"
src="https://raw.githubusercontent.com/BinBashBanana/deploy-buttons/main/buttons/remade/glitch.svg">
Expand Down
2 changes: 1 addition & 1 deletion config/settings.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ verboseLogging: "false"
private: "false"
username: "ruby"
password: "ruby"
mainURL: ""
mainURL: "http://localhost:9293/"
7 changes: 3 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ COPY . .
RUN apt update && apt install -y ruby-full
# Installing Bundler
RUN gem install bundler
# Install Node.js dependencies
RUN npm install
# Install Ruby dependencies
RUN bundle install
RUN yarn install
# Setup a basic configuration
RUN cp config/settings.example.yml config/settings.yml
# Mount config/settings.yml as a volume
VOLUME /usr/src/app/config/settings.yml
# Run the app
EXPOSE 9293
CMD yarn start
2 changes: 2 additions & 0 deletions docker/docker-compose.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ services:
ports:
# DO NOT CHANGE 9293!
- your port here:9293
volumes:
- ./config.yml:/usr/src/app/config/settings.yml
#networks:
# default:
# external:
Expand Down
20 changes: 11 additions & 9 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
version: '2'
services:
ruby:
restart: unless-stopped
image: 'ghcr.io/ruby-network/ruby:main'
ports:
#DO NOT CHANGE 9293!
- your port here:9293
ruby:
restart: unless-stopped
image: 'ghcr.io/ruby-network/ruby'
ports:
#DO NOT CHANGE 9293!
- 9293:9293
volumes:
- ./config.yml:/usr/src/app/config/settings.yml
#networks:
# default:
# external:
# name: default_net
# default:
# external:
# name: default_net
2 changes: 1 addition & 1 deletion node-server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ app.get('/search=:query', async (req, res) => {
}
});

app.listen({ port: nodePort });
app.listen({ port: nodePort, host: '0.0.0.0' });
console.log(chalk.green(`Server listening on port ${chalk.red(nodePort)}`));
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"start": "bundle exec puma -e production",
"install": "bundle install && npm run build",
"build": "node ./build.js"
},
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"@fastify/http-proxy": "^9.2.1",
Expand Down
6 changes: 6 additions & 0 deletions render.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
services:
- type: web
name: ruby
plan: free
env: docker
image: https://ghcr.io/ruby-network/ruby:main