Last active
August 29, 2015 14:12
-
-
Save JeanMertz/d9c53fee7a5be31ebeb0 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
. /etc/drone.d/rbenv.sh | |
bundle config --global path /cache | |
bundle config --global jobs $(cat /proc/cpuinfo | grep -c processor) | |
sudo service postgresql start | |
sudo redis-server /etc/redis/redis.conf | |
sudo service elasticsearch start |
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
#cloud-config | |
runcmd: | |
- curl -sSL https://get.docker.com/ubuntu/ | sudo sh | |
- mkdir -p /root/droneio/images && touch /root/droneio/drone.sqlite | |
- docker run -d -v /root/droneio/drone.sqlite:/var/lib/drone.sqlite -v /run/docker.sock:/run/docker.sock -p 8080:80 -e DRONE_GITHUB_CLIENT="$DRONE_GITHUB_CLIENT" -e DRONE_GITHUB_SECRET="$DRONE_GITHUB_SECRET" -e DRONE_DATABASE_DATASOURCE="/var/lib/drone.sqlite" jeanmertz/droned |
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 bradrydzewski/ruby:2.0.0 | |
WORKDIR /home/ubuntu | |
USER ubuntu | |
ENV DATABASE_URL postgres://localhost/test | |
ENV EXIT_ON_FIRST_FAILURE true | |
RUN gem install bundler | |
RUN wget -O - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add - \ | |
&& echo 'deb http://packages.elasticsearch.org/elasticsearch/1.2/debian stable main' | sudo tee -a /etc/apt/sources.list.d/elasticsearch.list | |
RUN wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - \ | |
&& echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' | sudo tee -a /etc/apt/sources.list.d/pgdg.list | |
RUN sudo apt-add-repository -y ppa:rwky/redis | |
RUN echo 'Europe/Amsterdam' | sudo tee /etc/timezone \ | |
&& sudo dpkg-reconfigure --frontend noninteractive tzdata | |
RUN sudo apt-get update \ | |
&& sudo apt-get install -y --no-install-recommends \ | |
postgresql-9.3 \ | |
postgresql-contrib-9.3 \ | |
redis-server \ | |
openjdk-7-jdk \ | |
elasticsearch \ | |
libmagickwand-dev \ | |
&& sudo apt-get clean autoclean \ | |
&& sudo apt-get -y autoremove \ | |
&& sudo rm -rf /var/lib/apt-lists/* /tmp/* /var/tmp/* | |
RUN echo "script.disable_dynamic: false" | sudo tee -a /etc/elasticsearch/elasticsearch.yml | |
ADD ci.sh /etc/drone.d/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment