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

Remove docker-sync #5

Merged
merged 1 commit into from
Sep 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
/pkg/
/spec/reports/
/tmp/
/node_modules
2 changes: 1 addition & 1 deletion Dockerfile-node.development
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:6-alpine

RUN mkdir /app && chown node:node /app
RUN mkdir /app /vendor && chown node:node /app /vendor

USER node
WORKDIR /app
18 changes: 14 additions & 4 deletions Dockerfile.development
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
ARG RUBY_VERSION=2.4.1
ARG RUBY_VERSION=2.4.2
FROM ruby:$RUBY_VERSION

RUN apt-get update && apt-get install less -y
RUN groupadd --gid 1000 ruby && useradd --uid 1000 --gid ruby --shell /bin/bash --create-home ruby
RUN mkdir /app && chown ruby:ruby /app
RUN mkdir /app /vendor && chown ruby:ruby /app /vendor

ENV LANG=C.UTF-8 \
BUNDLE_PATH=/app/vendor/bundle/$RUBY_VERSION \
BUNDLE_PATH=/vendor/bundle/$RUBY_VERSION \
BUNDLE_JOBS=4

ENV ENTRYKIT_VERSION 0.4.0

RUN wget https://github.com/progrium/entrykit/releases/download/v${ENTRYKIT_VERSION}/entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz \
&& tar -xvzf entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz \
&& rm entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz \
&& mv entrykit /bin/entrykit \
&& chmod +x /bin/entrykit \
&& entrykit --symlink

USER ruby
WORKDIR /app
CMD ["bundle", "exec", "exe/language_server"]

ENTRYPOINT ["prehook", "bin/setup", "--"]
4 changes: 1 addition & 3 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ set -euo pipefail
IFS=$'\n\t'
set -vx

bundle install

# Do any other automated setup that you need to do here
bundle check || bundle install
20 changes: 12 additions & 8 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ jobs:
build:
docker:
- image: tmaier/docker-compose
working_directory: /project
environment:
COMPOSE_FILE: docker-compose.yml:docker-compose.ci.yml
steps:
- checkout
- setup_remote_docker:
Expand All @@ -13,11 +14,14 @@ jobs:
command: |
set -x
docker info
docker volume create mtsmfm-language-server-protocol-sync
docker create -v mtsmfm-language-server-protocol-sync:/app --name mtsmfm-language-server-protocol-sync busybox chown -R 1000:1000 /app
docker cp . mtsmfm-language-server-protocol-sync:/app
docker start mtsmfm-language-server-protocol-sync
docker volume create project
docker create -v project:/app --name project busybox chown -R 1000:1000 /app
docker cp . project:/app
docker start project
docker-compose build
docker-compose run app bin/setup
docker-compose run ruby-2-3 bin/setup
docker-compose run ruby-2-2 bin/setup
- run:
name: test
command: |
docker-compose run app bundle exec rake test
docker-compose run ruby-2-3 bundle exec rake test
docker-compose run ruby-2-2 bundle exec rake test
14 changes: 14 additions & 0 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3.0'
services:
app: &app
volumes:
- project:/app
ruby-2-3:
<<: *app
ruby-2-2:
<<: *app
node:
<<: *app
volumes:
project:
external: true
15 changes: 15 additions & 0 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3.0'
services:
app: &app
volumes:
- .:/app:cached
- $HOME/.gitconfig:/home/ruby/.gitconfig:ro
- $HOME/.ssh:/home/ruby/.ssh:ro
- $HOME/.gem:/home/ruby/.gem
ruby-2-3:
<<: *app
ruby-2-2:
<<: *app
node:
volumes:
- .:/app:cached
14 changes: 5 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,27 @@ services:
context: .
dockerfile: Dockerfile.development
volumes:
- mtsmfm-language-server-protocol-sync:/app:nocopy
- vendor:/vendor
- home:/home/ruby
- $HOME/.gitconfig:/home/ruby/.gitconfig:ro
- $HOME/.ssh:/home/ruby/.ssh:ro
- $HOME/.gem:/home/ruby/.gem
ruby-2-3:
<<: *app
build:
<<: *app-build
args:
RUBY_VERSION: 2.3
RUBY_VERSION: 2.3.5
ruby-2-2:
<<: *app
build:
<<: *app-build
args:
RUBY_VERSION: 2.2
RUBY_VERSION: 2.2.8
node:
build:
context: .
dockerfile: Dockerfile-node.development
volumes:
- mtsmfm-language-server-protocol-sync:/app:nocopy
- vendor:/vendor
- home:/home/node
volumes:
mtsmfm-language-server-protocol-sync:
external: true
vendor:
home:
9 changes: 0 additions & 9 deletions docker-sync.yml

This file was deleted.