-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #383 from amd-9/feature/add_docker_support
Feature/add docker support
- Loading branch information
Showing
5 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM ruby:3.1.2 | ||
|
||
WORKDIR /usr/src/app/ | ||
|
||
COPY . . | ||
|
||
RUN apt update && apt install -y nodejs npm && npm install --global yarn | ||
|
||
RUN make setup | ||
|
||
RUN bin/rake db:migrate | ||
|
||
CMD "bundle exec puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-development}" | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
include make-compose.mk | ||
|
||
test: | ||
bin/rails test | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: '3.7' | ||
|
||
services: | ||
app: | ||
build: . | ||
volumes: | ||
- .:/usr/src/app/ | ||
ports: | ||
- "3000:3000" | ||
env_file: | ||
- ".env" | ||
command: "bundle exec puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-development}" | ||
webpacker: | ||
build: . | ||
environment: | ||
- WEBPACKER_DEV_SERVER_HOST=0.0.0.0 | ||
command: ./bin/webpack-dev-server | ||
volumes: | ||
- .:/usr/src/app/ | ||
ports: | ||
- '3035:3035' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
compose: | ||
docker-compose up -d | ||
|
||
compose-build: | ||
docker-compose build | ||
|
||
compose-logs: | ||
docker-compose logs -f | ||
|
||
compose-down: | ||
docker-compose down || true | ||
|
||
compose-clear: | ||
docker-compose down -v --remove-orphans || true | ||
|
||
compose-stop: | ||
docker-compose stop || true | ||
|
||
compose-restart: | ||
docker-compose restart | ||
|
||
compose-test: | ||
docker-compose run --rm app make fixtures-load && make test | ||
|
||
compose-lint: | ||
docker-compose run --rm app make lint | ||
|
||
compose-lint-fix: | ||
docker-compose run --rm app make linter-code-fix | ||
|