-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Dockerize app * Specify platform * Specify database host
1 parent
6c8cb9d
commit 48da0e3
Showing
6 changed files
with
58 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,4 @@ | |
|
||
# Ignore master key for decrypting credentials and more. | ||
/config/master.key | ||
.env.dev |
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,7 @@ | ||
FROM ruby:3.0.2-alpine AS dev | ||
RUN apk add build-base postgresql-dev tzdata bash | ||
WORKDIR /neue_wohnung | ||
ENV BUNDLE_PATH=/bundle \ | ||
BUNDLE_BIN=/bundle/bin \ | ||
GEM_HOME=/bundle | ||
ENV PATH="${BUNDLE_BIN}:${PATH}" |
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,20 @@ | ||
build: | ||
docker-compose build | ||
|
||
install: | ||
docker-compose run --rm web bundle install | ||
|
||
dbsetup: | ||
docker-compose run --rm web bundle exec rails db:setup | ||
|
||
server: | ||
docker-compose run --rm --service-ports web | ||
|
||
console: | ||
docker-compose run --rm web bundle exec rails console | ||
|
||
rubocop: | ||
docker-compose run --rm web bundle exec rubocop | ||
|
||
bash: | ||
docker-compose run --rm web bash |
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,25 @@ | ||
version: "3.9" | ||
services: | ||
web: | ||
platform: linux/x86_64 | ||
build: | ||
context: . | ||
target: dev | ||
env_file: | ||
- .env.dev | ||
stdin_open: true | ||
tty: true | ||
command: bundle exec rails server --binding 0.0.0.0 | ||
volumes: | ||
- ".:/neue_wohnung" | ||
- bundle:/bundle | ||
ports: | ||
- "3000:3000" | ||
depends_on: | ||
- db | ||
db: | ||
image: "healthcheck/postgres:alpine" | ||
environment: | ||
POSTGRES_PASSWORD: db_password | ||
volumes: | ||
bundle: |