* The previous Dockerfile was using and outdated format and was causing heavy load times. The number of the lines in the Dockerfile are defined as layer, with more layers more time and bigger is the final image. There were many things that were able to be delegated to the official ruby docker image. * - Use yarn community package - Don't create the workdir directory since is created by docker if doesn't exists - Remove config/application.yml from .dockerignore * Update Dockerfile Co-Authored-By: Abenet Tamiru <mail@abenet.me> * Update Dockerfile Co-Authored-By: Abenet Tamiru <mail@abenet.me> * Add directory copy, and user correct folder in compose * Update docker-compose and Dockerfile * Fix typo Co-Authored-By: Mac Siri <krairit.siri@gmail.com> * Update wording Co-Authored-By: Mac Siri <krairit.siri@gmail.com>
30 lines
670 B
YAML
30 lines
670 B
YAML
version: "3"
|
|
services:
|
|
web:
|
|
build: .
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
- db
|
|
environment:
|
|
RAILS_ENV: development
|
|
DATABASE_URL: postgres://postgres:mysecretpassword@db:5432/postgres
|
|
YARN_INTEGRITY_ENABLED: "false"
|
|
volumes:
|
|
- .:/usr/src/app
|
|
command: bundle exec rails server -b 0.0.0.0 -p 3000
|
|
jobs:
|
|
build: .
|
|
command: rails jobs:work
|
|
depends_on:
|
|
- db
|
|
environment:
|
|
RAILS_ENV: development
|
|
DATABASE_URL: postgres://postgres:mysecretpassword@db:5432/postgres
|
|
webpacker:
|
|
build: .
|
|
command: ./bin/webpack-dev-server
|
|
db:
|
|
image: postgres
|
|
ports:
|
|
- "5432:5432"
|