This file contains hidden or 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:2.6.4-alpine | |
MAINTAINER Al-waleed Shihadeh <[email protected]> | |
ENV PORT 8080 | |
ENV RACK_ENV=production RAILS_ENV=production | |
ENV RAILS_LOG_TO_STDOUT=true | |
ENV SECRET_KEY_BASE changeme | |
EXPOSE 8080 |
This file contains hidden or 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:<%= ruby_version %>-alpine | |
MAINTAINER Al-waleed Shihadeh <[email protected]> | |
ENV PORT 8080 | |
ENV RACK_ENV=production RAILS_ENV=production | |
ENV RAILS_LOG_TO_STDOUT=true | |
ENV SECRET_KEY_BASE changeme | |
EXPOSE 8080 |
This file contains hidden or 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
images: | |
# Ruby 2.6.3 | |
- name: rails-base-image-ruby:2.6.3 | |
ruby_version: 2.6.3 | |
additional_pkgs: [] | |
- name: rails-base-image-ruby:2.6.3-mysql | |
ruby_version: 2.6.3 | |
additional_pkgs: | |
- mariadb-dev |
This file contains hidden or 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
require 'fileutils' | |
module RailsBaseImages | |
class Dockerfile | |
attr_accessor :ruby_version, :additional_pkgs | |
def initialize(attributes = {}) | |
attributes.each do |key, value| | |
public_send("#{key}=", value) | |
end |
This file contains hidden or 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
language: ruby | |
rvm: | |
- "2.6.4" | |
branches: | |
only: | |
- master | |
before_script: | |
- echo $DOCKER_TOKEN | docker login -u $DOCKER_NAMESPACE --password-stdin | |
script: | |
- ./create_docker_files |
This file contains hidden or 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 wshihadeh/rails-base-image-ruby:2.6.3-mysql | |
MAINTAINER Al-waleed Shiahdeh <[email protected]> | |
COPY ./docker-entrypoint.sh / | |
ENTRYPOINT ["/docker-entrypoint.sh"] | |
WORKDIR /application | |
RUN bundle install --without development test && rails assets:precompile |
This file contains hidden or 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
pipeline { | |
/* specify nodes for executing */ | |
agent { | |
label 'ci-deployment' | |
} | |
/* log rotation */ | |
options { | |
buildDiscarder(logRotator(numToKeepStr: '50')) | |
} |
This file contains hidden or 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
properties([pipelineTriggers([githubPush()])]) | |
pipeline { | |
/* specify nodes for executing */ | |
agent { | |
label 'github-ci' | |
} | |
stages { | |
/* checkout repo */ |
This file contains hidden or 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
# The Project namespace, wshihadeh by default | |
NAMESPACE ?= wshihadeh | |
# Image name: simply we can use the application name | |
IMAGE_NAME := simple-rails | |
# The URL of Docker registry used to host the image. | |
REGISTRY ?= index.docker.io | |
# Docker image full name |
This file contains hidden or 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
pipeline { | |
agent { label 'ci-docker' } | |
parameters { | |
string(name: 'REPO', defaultValue: '[email protected]:wshihadeh/sample_app.git', description: 'The git repository') | |
string(name: 'BRANCH', defaultValue: 'master', description: 'Branch to build') | |
string(name: 'NAMESPACE', defaultValue: 'wshihadeh', description: 'Namespace for the Docker Image') | |
string(name: 'REGISTRY', defaultValue: 'index.docker.io', description: 'Registry to be used') | |
} |
OlderNewer