Last active
August 25, 2019 06:47
-
-
Save yalab/873f5efe849aad6abd312e0898281217 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
version: '3' | |
services: | |
db: | |
image: postgres:9.6.5 | |
volumes: | |
- db-data:/var/lib/postgresql/data | |
ports: | |
- 5432:5432 | |
app: | |
tty: true | |
stdin_open: true | |
build: . | |
command: ash -c "rm -f tmp/pids/server.pid && (bundle check || bundle install) && bundle exec rails s -b 0" | |
volumes: | |
- .:/app:cached | |
- gems:/gems | |
- yarn:/usr/local/share/.cache/yarn | |
ports: | |
- 3000:3000 | |
depends_on: | |
- db | |
environment: | |
DATABASE_URL: postgres://postgres@db/app | |
volumes: | |
db-data: | |
gems: | |
yarn: |
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-alpine | |
ENV LANG=C.UTF-8 \ | |
TZ=Asia/Tokyo \ | |
ROOT_PATH=/app \ | |
BUNDLE_JOBS=4 \ | |
BUNDLE_PATH=/gems | |
VOLUME /gems | |
RUN mkdir $ROOT_PATH | |
WORKDIR $ROOT_PATH | |
RUN apk add --update --no-cache \ | |
build-base \ | |
curl-dev \ | |
linux-headers \ | |
libxml2-dev \ | |
libxslt-dev \ | |
yaml-dev \ | |
zlib-dev \ | |
git \ | |
openssh \ | |
less \ | |
tzdata \ | |
postgresql-dev \ | |
libidn-dev \ | |
yaml \ | |
nodejs \ | |
npm | |
RUN npm install -g yarn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment