diff --git a/.dockerignore b/.dockerignore index fd354d5..b287d83 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,3 +3,5 @@ tmp docker/data node_modules +.DS_Store +yarn-error.log diff --git a/docker-compose.yml b/docker-compose.yml index 11b7d54..9089446 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,11 +5,12 @@ services: volumes: - ./docker/data:/var/lib/postgresql/data app: + image: cyton_dapps_app build: context: . dockerfile: ./docker/app/Dockerfile - volumes: - - .:/app + # volumes: + # - .:/app # for local debug command: bundle exec puma -C config/puma.docker.rb depends_on: - db diff --git a/docker/web/Dockerfile b/docker/web/Dockerfile index dbe9bf4..eae4004 100644 --- a/docker/web/Dockerfile +++ b/docker/web/Dockerfile @@ -13,8 +13,8 @@ WORKDIR $RAILS_ROOT # create log directory RUN mkdir log -# copy over static assets -COPY public public/ +# copy over static assets from rails app docker image +COPY --from=cyton_dapps_app:latest /app/public public/ # Copy Nginx config template COPY docker/web/nginx.conf /tmp/docker.nginx