Commit 4477db77 authored by David Foucher's avatar David Foucher

Add proxy dev config

* modify dockerfile for backoffice
* modifiy nginx conf
parent 11682391
Pipeline #1960 failed with stage
in 55 seconds
VUE_APP_TREFLE_URL=https://trefle.beta.pole-emploi.fr/
VUE_APP_API_VERSION=0.7
\ No newline at end of file
VUE_APP_TREFLE_URL=/
VUE_APP_API_VERSION=0.7
module.exports = {
publicPath: "/0.7/explorer/",
assetsDir: "src/assets/"
}
\ No newline at end of file
assetsDir: "src/assets/",
devServer: {
proxy: 'http://trefle.beta.pole-emploi.fr'
}
}
......@@ -13,20 +13,21 @@ server {
}
location = / {
root /srv/trefle/trefle;
root /srv/trefle/backoffice;
rewrite ^/$ /0.7/explorer last;
}
location /0.7 {
root /srv/trefle/trefle;
root /srv/trefle/backoffice;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
location /0.7/explorer {
alias /srv/trefle/trefle/explorer;
alias /srv/trefle/backoffice;
index index.html;
try_files $uri /0.7/explorer/index.html;
}
rewrite /0.7/(.*) /$1 break;
......
......@@ -38,6 +38,7 @@ services:
dockerfile: dockerfile_backoffice
args:
- TREFLE_GIT=${TREFLE_GIT:-https://git.beta.pole-emploi.fr/open-source/trefle.git}
- TREFLE_BACK_VERSION=${BACK_VERSION}
- TREFLE_VERSION=${VERSION}
- TREFLE_OLD_VERSION=${OLD_VERSION}
depends_on:
......
FROM node:10 AS back_app_node
ARG TREFLE_GIT
ARG TREFLE_BACK_VERSION
RUN git clone -b ${TREFLE_BACK_VERSION} ${TREFLE_GIT} /srv/trefle && \
chown -R www-data: /srv/trefle && \
chmod -R u+rwx /srv/trefle && \
cd /srv/trefle/backoffice && \
npm install && \
npm run build
FROM ubuntu:xenial
LABEL maintainer="labonneformation@pole-emploi.fr"
......@@ -19,13 +32,10 @@ RUN apt-get update && apt-get -y install \
dnsutils
ARG TREFLE_GIT
ARG TREFLE_VERSION
RUN git clone -b ${TREFLE_VERSION} ${TREFLE_GIT} /srv/trefle && \
chown -R www-data: /srv/trefle && \
chmod -R u+rwx /srv/trefle
COPY --from=back_app_node /srv/trefle/backoffice/dist /srv/trefle/backoffice
ARG TREFLE_GIT
ARG TREFLE_OLD_VERSION
RUN git clone -b ${TREFLE_OLD_VERSION} ${TREFLE_GIT} /srv/trefle-old && \
chown -R www-data: /srv/trefle-old && \
......
File mode changed from 100644 to 100755
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment