mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 19:27:52 +01:00
Add API (#427)
This commit is contained in:
committed by
GitHub
parent
5ad04adb10
commit
31999a2af6
@@ -37,9 +37,12 @@ RUN yarn install --check-files
|
||||
# Copy all files
|
||||
COPY . ${APP_ROOT}/
|
||||
|
||||
# Build Swagger API documentation
|
||||
RUN RSWAG_SWAGGERIZE=true RAILS_ENV=test bundle exec rake rswag:specs:swaggerize
|
||||
|
||||
# Compile assets if production
|
||||
# SECRET_KEY_BASE=1 is a workaround (see https://github.com/rails/rails/issues/32947)
|
||||
RUN if [ "$ENVIRONMENT" = "production" ]; then RAILS_ENV=development ./bin/rails assets:precompile; fi
|
||||
RUN if [ "$ENVIRONMENT" = "production" ]; then SECRET_KEY_BASE=1 ./bin/rails assets:precompile; fi
|
||||
|
||||
###
|
||||
### Dev stage ###
|
||||
@@ -91,6 +94,9 @@ COPY --from=builder ${APP_ROOT}/Rakefile ${APP_ROOT}/
|
||||
COPY --from=builder ${APP_ROOT}/lib/tasks/ ${APP_ROOT}/lib/tasks/
|
||||
COPY --from=builder /usr/local/bundle/config /usr/local/bundle/config
|
||||
|
||||
# Copy Swagger API documentation
|
||||
COPY --from=builder ${APP_ROOT}/swagger/ ${APP_ROOT}/swagger/
|
||||
|
||||
ENTRYPOINT ["./docker-entrypoint-prod.sh"]
|
||||
|
||||
EXPOSE 3000
|
||||
Reference in New Issue
Block a user