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
services: | |
css: | |
image: initapp-rails | |
env_file: | |
- .docker.env | |
- .env | |
volumes: | |
- ./:/app:c | |
- cache:/app/tmp/cache:d | |
- bundle:/usr/local/bundle:ro |
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
name: Initapp-rails | |
services: | |
app: | |
image: initapp-rails | |
build: | |
context: . | |
target: development | |
env_file: | |
- .docker.env |
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
FROM ruby:3.2.5-slim-bullseye AS development | |
COPY --from=node:20.16.0-bullseye-slim /usr/local/bin/node /usr/local/bin/ | |
COPY --from=node:20.16.0-bullseye-slim /usr/local/lib/node_modules /usr/local/lib/node_modules | |
COPY --from=node:20.16.0-bullseye-slim /opt/yarn-v1.22.22 /opt/yarn-v1.22.22 | |
RUN ln -s /usr/local/bin/node /usr/local/bin/nodejs && \ | |
ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \ | |
ln -s /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx && \ | |
ln -s /usr/local/lib/node_modules/corepack/dist/corepack.js /usr/local/bin/corepack && \ |
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
# NOTE: github actions at ./.github/workflows/ folder | |
# NOTE: generate ssh keypair at server, put pub key into authorized_keys at server and private key as SERVER github secrets | |
name: 'Build docker image, run tests and deploy' | |
on: | |
push: | |
jobs: | |
build: | |
name: Deploy docker-compose.prod.yml |
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
def perform(url) | |
return unless url | |
response = HTTParty.get(url) | |
return unless response.success? | |
data = JSON.parse(response.body) | |
return unless data['results'] | |
data['results'].each do |test| |
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
FROM node:14-alpine as node | |
FROM ruby:2.7.0-alpine3.11 as build-base | |
COPY --from=node /usr/local/bin/node /usr/local/bin/ | |
COPY --from=node /opt/yarn-v1.22.4 /opt/yarn-v1.22.4 | |
RUN ln -s /usr/local/bin/node /usr/local/bin/nodejs | |
# Here is you can copy npm from node to build-base if you preffer use it | |
RUN ln -s /opt/yarn-v1.22.4/bin/yarn /usr/local/bin/yarn |
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
version: "3.8" | |
volumes: | |
node_modules: | |
services: | |
ui: | |
image: node:14.8.0-alpine3.12 | |
ports: | |
- 3000:8080 |
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
# app/models/concerns/user_jwt.rb | |
module UserJwt | |
extend ActiveSupport::Concern | |
included do | |
include ActiveModel::SecurePassword | |
has_secure_password | |
field :email, type: String | |
field :phone, type: String |
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
FROM node:current-alpine3.11 as node | |
FROM ruby:2.6.5-alpine3.11 as build-base | |
COPY --from=node /usr/local/bin/node /usr/local/bin/ | |
COPY --from=node /opt/yarn-v1.22.0 /opt/yarn-v1.22.0 | |
RUN ln -s /usr/local/bin/node /usr/local/bin/nodejs | |
RUN ln -s /opt/yarn-v1.22.0/bin/yarn /usr/local/bin/yarn | |
RUN ln -s /opt/yarn-v1.22.0/bin/yarnpkg /usr/local/bin/yarnpkg |
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
# add this gems to Gemfile | |
gem 'bootstrap', '~> 4.3.1' | |
gem 'jquery-rails' | |
gem 'popper_js', '~> 1.14.5' |
NewerOlder