-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* First Dockerfile * Fixed dependencies * Dependency build order sped up * rm .env * Update README.md * Add Windows quirks to ReadMe * Add rails webpacker:install to the readme * Gemfile bump Co-authored-by: tumbleshack <[email protected]>
- Loading branch information
1 parent
ba93adc
commit 935ebcf
Showing
10 changed files
with
129 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/node_modules | ||
/tmp | ||
/db/data |
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 |
---|---|---|
|
@@ -34,3 +34,6 @@ | |
/yarn-error.log | ||
yarn-debug.log* | ||
.yarn-integrity | ||
|
||
.env | ||
/db/data |
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 @@ | ||
FROM ruby:2.7.0 | ||
RUN apt-get update -qq | ||
|
||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - | ||
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | ||
RUN apt-get update && apt-get install -y yarn | ||
|
||
WORKDIR /cc_server | ||
|
||
COPY Gemfile /cc_server/Gemfile | ||
COPY Gemfile.lock /cc_server/Gemfile.lock | ||
RUN bundle install && gem install bundler:2.2.1 | ||
|
||
COPY package.json /cc_server/package.json | ||
COPY yarn.lock /cc_server/yarn.lock | ||
RUN yarn install --check-files | ||
|
||
COPY . /cc_server | ||
|
||
# Start the main process. | ||
CMD rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0' |
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
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,49 @@ | ||
version: "3.7" | ||
services: | ||
cc_server: | ||
build: . | ||
container_name: cc_server | ||
# restart: unless-stopped | ||
env_file: .env | ||
volumes: | ||
- .:/cc_server:cached | ||
ports: | ||
- 3000:3000 | ||
expose: | ||
- 3000 | ||
networks: | ||
- container_network | ||
depends_on: | ||
- cc_mysql | ||
- cc_redis | ||
cc_mysql: | ||
container_name: cc_mysql | ||
image: mysql:8.0 | ||
command: --default-authentication-plugin=mysql_native_password | ||
# restart: always | ||
env_file: .env | ||
ports: | ||
- "127.0.0.1:3306:3306" | ||
expose: | ||
- 3306 | ||
volumes: | ||
- ./db/scripts/:/docker-entrypoint-initdb.d/ | ||
- ./db/data/MySQL/:/var/lib/mysql/ | ||
networks: | ||
- container_network | ||
cc_redis: | ||
container_name: cc_redis | ||
image: redis:latest | ||
command: redis-server --requirepass $REDIS_PASSWORD --bind cc_redis --port 6379 | ||
env_file: .env | ||
ports: | ||
- "127.0.0.1:6379:6379" | ||
expose: | ||
- 6379 | ||
volumes: | ||
- ./db/data/Redis:/data | ||
networks: | ||
- container_network | ||
networks: | ||
container_network: | ||
driver: bridge |
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,8 @@ | ||
RAILS_ENV=development | ||
|
||
DATABASE_NAME=CarriesCloset_development | ||
DATABASE_USER=CarriesCloset_development | ||
MYSQL_ALLOW_EMPTY_PASSWORD=true | ||
DATABASE_HOST=cc_mysql | ||
|
||
REDIS_PASSWORD=password |
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
}, | ||
"version": "0.1.0", | ||
"devDependencies": { | ||
"webpack": "^4.43.0", | ||
"webpack-dev-server": "^3.11.2" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.