chore: kemal + crystal setup
This commit is contained in:
@@ -1 +0,0 @@
|
||||
defaults
|
||||
@@ -1,6 +0,0 @@
|
||||
.git
|
||||
.gitignore
|
||||
|
||||
config/master.key
|
||||
|
||||
README.md
|
||||
@@ -0,0 +1,9 @@
|
||||
root = true
|
||||
|
||||
[*.cr]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
trim_trailing_whitespace = true
|
||||
@@ -1,7 +0,0 @@
|
||||
check_name: RuboCop Results
|
||||
|
||||
versions:
|
||||
- rubocop
|
||||
- rubocop-rails
|
||||
|
||||
rubocop_fail_level: error
|
||||
@@ -1,24 +0,0 @@
|
||||
name: Deploy production to donado.co
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: RuboCop Linter Action
|
||||
uses: andrewmcodes/rubocop-linter-action@v3.3.0
|
||||
with:
|
||||
action_config_path: .github/config/rubocop_linter_action.yml
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Push to dokku
|
||||
uses: dokku/github-action@master
|
||||
with:
|
||||
git_remote_url: "ssh://dokku@ssh.donado.co:22/url-shortener"
|
||||
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
+5
-40
@@ -1,40 +1,5 @@
|
||||
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
||||
#
|
||||
# If you find yourself ignoring temporary files generated by your text editor
|
||||
# or operating system, you probably want to add a global ignore instead:
|
||||
# git config --global core.excludesfile '~/.gitignore_global'
|
||||
|
||||
# Ignore bundler config.
|
||||
/.bundle
|
||||
|
||||
# Ignore all logfiles and tempfiles.
|
||||
/log/*
|
||||
/tmp/*
|
||||
!/log/.keep
|
||||
!/tmp/.keep
|
||||
|
||||
# Ignore uploaded files in development
|
||||
/storage/*
|
||||
!/storage/.keep
|
||||
|
||||
/node_modules
|
||||
/yarn-error.log
|
||||
|
||||
/public/assets
|
||||
.byebug_history
|
||||
|
||||
# Ignore master key for decrypting credentials and more.
|
||||
/config/master.key
|
||||
|
||||
# Ignore coverage reports
|
||||
/coverage/*
|
||||
|
||||
/public/packs
|
||||
/public/packs-test
|
||||
/node_modules
|
||||
/yarn-error.log
|
||||
yarn-debug.log*
|
||||
.yarn-integrity
|
||||
|
||||
# Ignore keys
|
||||
*.key
|
||||
/docs/
|
||||
/lib/
|
||||
/bin/
|
||||
/.shards/
|
||||
*.dwarf
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
require: rubocop-rails
|
||||
|
||||
AllCops:
|
||||
NewCops: enable
|
||||
Style/Documentation:
|
||||
Enabled: false
|
||||
Style/MixinUsage:
|
||||
Exclude:
|
||||
- 'bin/*'
|
||||
@@ -1 +0,0 @@
|
||||
ruby-2.6.6
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
FROM ruby:2.6.3-alpine
|
||||
|
||||
ARG RAILS_MASTER_KEY=''
|
||||
ENV RAILS_MASTER_KEY ${RAILS_MASTER_KEY}
|
||||
|
||||
ENV RAILS_ENV production
|
||||
ENV APP_PATH /usr/src/app
|
||||
ENV BUNDLE_VERSION 2.1.4
|
||||
|
||||
WORKDIR $APP_PATH
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ENV ALPINE_MIRROR "http://dl-cdn.alpinelinux.org/alpine"
|
||||
RUN echo "${ALPINE_MIRROR}/v3.11/main/" >> /etc/apk/repositories
|
||||
|
||||
RUN apk -U add --no-cache \
|
||||
build-base \
|
||||
postgresql-dev \
|
||||
postgresql-client \
|
||||
tzdata \
|
||||
nodejs --repository="http://dl-cdn.alpinelinux.org/alpine/v3.11/main/" \
|
||||
yarn
|
||||
|
||||
COPY ./entrypoint.sh /usr/bin/entrypoint.sh
|
||||
RUN chmod +x /usr/bin/entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["entrypoint.sh"]
|
||||
|
||||
RUN gem install bundler --version "$BUNDLE_VERSION"
|
||||
|
||||
COPY ./Gemfile .
|
||||
COPY ./Gemfile.lock .
|
||||
|
||||
RUN bundle install --binstubs
|
||||
|
||||
COPY ./package.json .
|
||||
COPY ./yarn.lock .
|
||||
|
||||
RUN yarn --production
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN RAILS_ENV=production bundle exec rails assets:precompile
|
||||
|
||||
CMD ["bundle", "exec", "rails", "s", "-b", "0.0.0.0"]
|
||||
@@ -1,3 +0,0 @@
|
||||
FROM postgres:12.5-alpine
|
||||
|
||||
COPY docker-entrypoint-initdb.sql /docker-entrypoint-initdb.d/
|
||||
@@ -1,31 +0,0 @@
|
||||
FROM ruby:2.6.3-alpine
|
||||
|
||||
ENV APP_PATH /usr/src/app
|
||||
ENV BUNDLE_VERSION 2.1.4
|
||||
ENV BUNDLE_PATH /usr/local/bundle/gems
|
||||
ENV RAILS_LOG_TO_STDOUT true
|
||||
ENV RAILS_PORT 3000
|
||||
|
||||
WORKDIR $APP_PATH
|
||||
|
||||
EXPOSE $RAILS_PORT
|
||||
|
||||
ENV ALPINE_MIRROR "http://dl-cdn.alpinelinux.org/alpine"
|
||||
RUN echo "${ALPINE_MIRROR}/v3.11/main/" >> /etc/apk/repositories
|
||||
|
||||
RUN apk -U add --no-cache \
|
||||
build-base \
|
||||
postgresql-dev \
|
||||
postgresql-client \
|
||||
tzdata \
|
||||
nodejs --repository="http://dl-cdn.alpinelinux.org/alpine/v3.11/main/" \
|
||||
yarn
|
||||
|
||||
COPY ./entrypoint.dev.sh /usr/bin/entrypoint.sh
|
||||
RUN chmod +x /usr/bin/entrypoint.sh
|
||||
|
||||
RUN gem install bundler --version "$BUNDLE_VERSION"
|
||||
|
||||
COPY . .
|
||||
|
||||
ENTRYPOINT ["entrypoint.sh"]
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 Juan Rodriguez <sjdonado@icloud.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,27 @@
|
||||
# url-shortener
|
||||
|
||||
TODO: Write a description here
|
||||
|
||||
## Installation
|
||||
|
||||
TODO: Write installation instructions here
|
||||
|
||||
## Usage
|
||||
|
||||
TODO: Write usage instructions here
|
||||
|
||||
## Development
|
||||
|
||||
TODO: Write development instructions here
|
||||
|
||||
## Contributing
|
||||
|
||||
1. Fork it (<https://github.com/your-github-user/url-shortener/fork>)
|
||||
2. Create your feature branch (`git checkout -b my-new-feature`)
|
||||
3. Commit your changes (`git commit -am 'Add some feature'`)
|
||||
4. Push to the branch (`git push origin my-new-feature`)
|
||||
5. Create a new Pull Request
|
||||
|
||||
## Contributors
|
||||
|
||||
- [Juan Rodriguez](https://github.com/your-github-user) - creator and maintainer
|
||||
@@ -0,0 +1,13 @@
|
||||
name: url-shortener
|
||||
version: 0.1.0
|
||||
|
||||
authors:
|
||||
- Juan Rodriguez <sjdonado@icloud.com>
|
||||
|
||||
targets:
|
||||
url-shortener:
|
||||
main: src/url-shortener.cr
|
||||
|
||||
crystal: '>= 1.12.1'
|
||||
|
||||
license: MIT
|
||||
@@ -0,0 +1,2 @@
|
||||
require "spec"
|
||||
require "../src/url-shortener"
|
||||
@@ -0,0 +1,9 @@
|
||||
require "./spec_helper"
|
||||
|
||||
describe Url::Shortener do
|
||||
# TODO: Write tests
|
||||
|
||||
it "works" do
|
||||
false.should eq(true)
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
# TODO: Write documentation for `Url::Shortener`
|
||||
module Url::Shortener
|
||||
VERSION = "0.1.0"
|
||||
|
||||
# TODO: Put your code here
|
||||
end
|
||||
Reference in New Issue
Block a user