Skip to content

Instantly share code, notes, and snippets.

View pawelkomarnicki's full-sized avatar
🚀
https://cubitoo.com/blog

Paweł Komarnicki pawelkomarnicki

🚀
https://cubitoo.com/blog
View GitHub Profile
@pawelkomarnicki
pawelkomarnicki / docker-compose-guidelines.md
Last active December 6, 2018 09:32
docker-compose guidelines

docker-compose conventions

Service naming convention

# Due to lack of "expressivity" in Compose, we define our own couple of service "pseudo-types":
#
#   - image-only services (name: *-image)
#     The only goal of these is to build images. No other services build images.
#     These have entrypoint overridden to exit immediately.
#
@pawelkomarnicki
pawelkomarnicki / docker-compose.yml
Created July 8, 2018 13:16
Jekyll docker-compose.yml
version: '3'
services:
default: &default
image: jekyll/jekyll
volumes:
- .:/srv/jekyll
ports:
- "80:4000"
@pawelkomarnicki
pawelkomarnicki / .bash_profile
Last active August 14, 2018 09:56
Bash profile things
export PS1="\w » "
export EDITOR=code
# Requires file from https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
source ~/git-completion.bash
# Make docker-compose commands shorter
alias dcb='docker-compose build'
alias dcu='docker-compose up'
alias dcd='docker-compose down'
FROM ruby:2.5
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
RUN mkdir /myapp
WORKDIR /myapp
COPY Gemfile /myapp/Gemfile
COPY Gemfile.lock /myapp/Gemfile.lock
RUN bundle install
COPY . /myapp