Skip to content

Commit

Permalink
build: try serving directly for CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Jun 16, 2024
1 parent d93e239 commit 8947895
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN apt-get update && apt-get install -y \
zip

# 2. Apache configs + document root.
RUN echo 'Header set Access-Control-Allow-Origin "*"' >> /etc/apache2/apache2.conf
# RUN echo 'Header set Access-Control-Allow-Origin "*"' >> /etc/apache2/apache2.conf

RUN sed -ri -e 's!/var/www/html!/var/www/html/public!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!/var/www/html/public!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
Expand Down Expand Up @@ -160,4 +160,7 @@ RUN sudo chmod -R a+rw /var/www/html/vendor
RUN /usr/bin/composer run seed:initial

# 6. Start HTTP service to apply changes
RUN service apache2 restart
RUN service apache2 stop
CMD [ "php", "spark", "serve", "--host=0.0.0.0", "--port=80" ]

EXPOSE 80

0 comments on commit 8947895

Please sign in to comment.