Skip to content
Permalink
Browse files

Move Dockerfile to docker directory

  • Loading branch information
riggraz committed Dec 3, 2019
1 parent 68acccf commit d8443bf0c45af145a4c1921f4eacf003f18f5cde
Showing with 13 additions and 10 deletions.
  1. +4 βˆ’2 docker-compose.yml
  2. +2 βˆ’2 docker-entrypoint.sh
  3. +7 βˆ’6 { β†’ docker/app}/Dockerfile
@@ -8,7 +8,9 @@ services:
volumes:
- ./tmp/db:/var/lib/postgresql/data
web:
build: .
build:
context: .
dockerfile: ./docker/app/Dockerfile
environment:
- UPDATE=0
- ENVIRONMENT
@@ -20,7 +22,7 @@ services:
- SHOW_LOGO
- POSTS_PER_PAGE
volumes:
- .:/app
- .:/astuto
ports:
- "3000:3000"
depends_on:
@@ -12,7 +12,7 @@ set -e
/bin/bash ./check-env.sh

# Remove a potentially pre-existing server.pid for Rails.
rm -f /app/tmp/pids/server.pid
rm -f $APP_ROOT/tmp/pids/server.pid

# Use case 1
if [ "$UPDATE" = 1 ]; then
@@ -32,7 +32,7 @@ if [ "$UPDATE" = 1 ]; then

# Use webpack to build JS and CSS.
echo "Compiling JS and CSS with webpack..."
./bin/webpack
$APP_ROOT/bin/webpack
echo "Webpack compilation completed."

exit 0
@@ -9,24 +9,25 @@ RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.d
RUN dpkg -i /google-chrome-stable_current_amd64.deb; apt-get -fy install
RUN rm /google-chrome-stable_current_amd64.deb

RUN mkdir /app
WORKDIR /app
ENV APP_ROOT /astuto
RUN mkdir ${APP_ROOT}
WORKDIR ${APP_ROOT}

# Launch processes in Procfile
RUN gem install foreman

# Copy Gemfile and install gems
COPY Gemfile* /app/
COPY Gemfile* ${APP_ROOT}/
RUN bundle install

# Copy package.json and install packages
COPY package.json yarn.lock /app/
COPY package.json yarn.lock ${APP_ROOT}/
RUN yarn install --check-files

COPY . /app
COPY . ${APP_ROOT}

# Add a script to be executed every time the container starts.
ENTRYPOINT ["/app/docker-entrypoint.sh"]
ENTRYPOINT ["./docker-entrypoint.sh"]

EXPOSE 3000

0 comments on commit d8443bf

Please sign in to comment.
You can’t perform that action at this time.