Skip to content

Instantly share code, notes, and snippets.

@hieu-v
Created June 26, 2022 08:58
Show Gist options
  • Save hieu-v/084cb05c4877b6fc51fd04b9884df22b to your computer and use it in GitHub Desktop.
Save hieu-v/084cb05c4877b6fc51fd04b9884df22b to your computer and use it in GitHub Desktop.
```
FROM ruby:3.1.2-alpine
RUN apk add --no-cache \
build-base \
postgresql-dev \
git \
nodejs \
npm \
yarn \
tzdata \
vim
WORKDIR /app
COPY Gemfile* /app/
RUN bundle config --local frozen 1 && \
bundle install -j4 --retry 3
COPY . /app/
RUN chmod a+x docker/scripts/*.sh
ENTRYPOINT ["sh","docker/scripts/startup.sh"]
version: "3.9"
services:
db:
image: postgres:14-alpine
environment:
volumes:
- db-data:/var/lib/postgresql/data
app: &app_base
build:
context: ./backend/
ports:
- 3000
links:
- db
volumes:
db-data:
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment