Unverified Commit 2931fedd authored by Benoit Courty's avatar Benoit Courty Committed by GitHub

PR #128 Docker : fix the error showing up in client

Docker : fix the error showing up in client
parents 5bea0d0e 147f8b1f
......@@ -88,6 +88,7 @@ build/Release
# Dependency directories
node_modules/
jspm_packages/
build/
# TypeScript v1 declaration files
typings/
......
......@@ -11,8 +11,9 @@ services:
- 9080:9001
volumes:
- .:/opt/leximpact-client
- /opt/leximpact-client/node_modules
- /opt/leximpact-client/node_modules # exclude node_modules from mount : keep it in container
- /opt/leximpact-client/build # exclude build from mount : keep it in container
networks:
leximpact_net:
name: leximpact_client_only_network
\ No newline at end of file
name: leximpact_network
FROM node:12-alpine
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh
FROM node:12
WORKDIR /opt
RUN git clone https://github.com/leximpact/leximpact-client.git
WORKDIR /opt/leximpact-client
COPY package.json .
RUN echo "API_URL=https://api.leximpact.an.fr/" > .env
# Clean just to be sure
RUN rm -rf node_modules build
# Install dependencies
RUN npm update
RUN npm install
# Copy everything
COPY . .
RUN npm run test
RUN npm run code:check
RUN npm run build
EXPOSE 9001
CMD ["npm", "run", "dev"]
#ENTRYPOINT ["watch", "-n", "60", "echo 'Client is in debug...'"]
\ No newline at end of file
......@@ -2,4 +2,4 @@ PORT=9001
NODE_ENV=development
# Accept external connection for Docker
HOST=0.0.0.0
API_URL=http://leximpact_server:5000
\ No newline at end of file
API_URL=http://localhost:5079/
\ No newline at end of file
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