mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 19:27:52 +01:00
Move Dockerfile to docker directory
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user