Add Dockerfile for development
This commit is contained in:
parent
0ca85656b7
commit
fa3b53d3b3
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
FROM ruby:2.7
|
||||||
|
RUN apt-get update -qq && apt-get install -y curl ldap-utils
|
||||||
|
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
|
||||||
|
RUN apt-get update && apt-get install -y nodejs
|
||||||
|
WORKDIR /akkounts
|
||||||
|
COPY Gemfile /akkounts/Gemfile
|
||||||
|
COPY Gemfile.lock /akkounts/Gemfile.lock
|
||||||
|
COPY package.json /akkounts/package.json
|
||||||
|
RUN bundle install
|
||||||
|
RUN npm install -g yarn
|
||||||
|
RUN yarn install
|
||||||
|
|
||||||
|
# Add a script to be executed every time the container starts.
|
||||||
|
COPY docker/entrypoint.sh /usr/bin/
|
||||||
|
RUN chmod +x /usr/bin/entrypoint.sh
|
||||||
|
ENTRYPOINT ["entrypoint.sh"]
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
# Configure the main process to run when running the image
|
||||||
|
CMD ["bin", "dev"]
|
@ -63,4 +63,7 @@ Rails.application.configure do
|
|||||||
config.action_mailer.raise_delivery_errors = false
|
config.action_mailer.raise_delivery_errors = false
|
||||||
# Base URL to be used by email template link helpers
|
# Base URL to be used by email template link helpers
|
||||||
config.action_mailer.default_url_options = { host: "localhost:3000", protocol: "http" }
|
config.action_mailer.default_url_options = { host: "localhost:3000", protocol: "http" }
|
||||||
|
|
||||||
|
# Allow requests from any IP
|
||||||
|
config.web_console.whiny_requests = false
|
||||||
end
|
end
|
||||||
|
8
docker/entrypoint.sh
Normal file
8
docker/entrypoint.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Remove a potentially pre-existing server.pid for Rails.
|
||||||
|
rm -f /myapp/tmp/pids/server.pid
|
||||||
|
|
||||||
|
# Then exec the container's main process (what's set as CMD in the Dockerfile).
|
||||||
|
exec "$@"
|
Loading…
x
Reference in New Issue
Block a user