Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1904c999ec | ||
|
|
81266dd64b |
@@ -1,2 +1,2 @@
|
|||||||
parameters:
|
parameters:
|
||||||
app.version: '0.1.24'
|
app.version: '0.1.25'
|
||||||
|
|||||||
@@ -68,6 +68,9 @@ COPY --from=backend-build /app /var/www/html
|
|||||||
# Frontend from stage 2
|
# Frontend from stage 2
|
||||||
COPY --from=frontend-build /app/frontend/.output/public /var/www/html/frontend/.output/public
|
COPY --from=frontend-build /app/frontend/.output/public /var/www/html/frontend/.output/public
|
||||||
|
|
||||||
|
# Maintenance page
|
||||||
|
COPY infra/prod/maintenance.html /var/www/html/public/maintenance.html
|
||||||
|
|
||||||
# Symfony needs a .env file to boot (variables are overridden by env_file in docker-compose)
|
# Symfony needs a .env file to boot (variables are overridden by env_file in docker-compose)
|
||||||
RUN echo "APP_ENV=prod" > /var/www/html/.env
|
RUN echo "APP_ENV=prod" > /var/www/html/.env
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:8083;
|
proxy_pass http://127.0.0.1:8086;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|||||||
@@ -10,6 +10,16 @@ server {
|
|||||||
access_log /dev/stdout;
|
access_log /dev/stdout;
|
||||||
error_log /dev/stderr;
|
error_log /dev/stderr;
|
||||||
|
|
||||||
|
# Mode maintenance : créer /var/www/html/maintenance.on pour activer
|
||||||
|
if (-f /var/www/html/maintenance.on) {
|
||||||
|
return 503;
|
||||||
|
}
|
||||||
|
error_page 503 @maintenance;
|
||||||
|
location @maintenance {
|
||||||
|
root /var/www/html/public;
|
||||||
|
rewrite ^(.*)$ /maintenance.html break;
|
||||||
|
}
|
||||||
|
|
||||||
location ^~ /api/ {
|
location ^~ /api/ {
|
||||||
root /var/www/html/public;
|
root /var/www/html/public;
|
||||||
try_files $uri /index.php?$query_string;
|
try_files $uri /index.php?$query_string;
|
||||||
|
|||||||
Reference in New Issue
Block a user