Skip to content

Commit

Permalink
Merge pull request #166 from portabilis/docker
Browse files Browse the repository at this point in the history
Docker
  • Loading branch information
edersoares authored Jun 20, 2024
2 parents dfde6eb + 65f290e commit 1251f2e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 31 deletions.
19 changes: 7 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM ruby:2.4.10-slim-buster
FROM ruby:2.6.6-slim-buster

ENV APP_PATH /app
ENV BUNDLE_PATH /box

RUN apt-get update -qq
RUN apt-get install -y \
Expand All @@ -8,15 +11,7 @@ RUN apt-get install -y \
git \
shared-mime-info
RUN npm i -g yarn
RUN gem update --system 3.3.22
RUN mkdir $APP_PATH

ENV app /app

RUN mkdir $app

WORKDIR $app

RUN gem install bundler:1.17.3

COPY Gemfile Gemfile.lock /app/

ENV BUNDLE_PATH /box
WORKDIR $APP_PATH
36 changes: 17 additions & 19 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
version: "3.7"

services:

postgres:
image: postgres:alpine
container_name: postgres-idiario
ports:
- 5432
volumes:
- pg_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=idiario_development
- POSTGRES_PASSWORD=postgres

redis:
image: redis:alpine
container_name: redis-idiario
ports:
- 6379

app:
build: .
container_name: idiario
Expand All @@ -34,6 +15,23 @@ services:
- postgres
- redis

postgres:
image: postgres:16-alpine
container_name: postgres-idiario
ports:
- 5432
volumes:
- pg_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=idiario_development
- POSTGRES_PASSWORD=postgres

redis:
image: redis:7-alpine
container_name: redis-idiario
ports:
- 6379

volumes:
app:
box:
Expand Down

0 comments on commit 1251f2e

Please sign in to comment.