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

Docker #166

Merged
merged 2 commits into from
Jun 20, 2024
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
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
Loading