mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
Tune webpack config and add Dockerfile
Add Dockerfile for running containerized dev server. Update webpack config to make dev server available over exposed docker port.
This commit is contained in:
0
awx/ui_next/.npmrc
Normal file
0
awx/ui_next/.npmrc
Normal file
20
awx/ui_next/Dockerfile
Normal file
20
awx/ui_next/Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
FROM node:10
|
||||||
|
ARG NPMRC_FILE=.npmrc
|
||||||
|
ENV NPMRC_FILE=${NPMRC_FILE}
|
||||||
|
ARG TARGET_HOST='awx'
|
||||||
|
ENV TARGET_HOST=${TARGET_HOST}
|
||||||
|
ARG TARGET_PORT=8043
|
||||||
|
ENV TARGET_PORT=${TARGET_PORT}
|
||||||
|
WORKDIR /ui_next
|
||||||
|
ADD build build
|
||||||
|
ADD dist dist
|
||||||
|
ADD images images
|
||||||
|
ADD package.json package.json
|
||||||
|
ADD package-lock.json package-lock.json
|
||||||
|
COPY ${NPMRC_FILE} .npmrc
|
||||||
|
RUN npm install
|
||||||
|
ADD babel.config.js babel.config.js
|
||||||
|
ADD webpack.config.js webpack.config.js
|
||||||
|
ADD src src
|
||||||
|
EXPOSE 3001
|
||||||
|
CMD [ "npm", "run", "start" ]
|
||||||
@@ -27,3 +27,16 @@ To run a single test (in this case the login page test):
|
|||||||
* `npm test -- src/screens/Login/Login.test.jsx`
|
* `npm test -- src/screens/Login/Login.test.jsx`
|
||||||
|
|
||||||
**note:** Once the test watcher is up and running you can hit `a` to run all the tests
|
**note:** Once the test watcher is up and running you can hit `a` to run all the tests
|
||||||
|
|
||||||
|
|
||||||
|
## CI Container
|
||||||
|
|
||||||
|
To run:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cd awx/awx/ui_next
|
||||||
|
docker build -t awx-ui-next .
|
||||||
|
docker run --name tools_ui_next_1 --network tools_default --link 'tools_awx_1:awx' -e TARGET_HOST=awx -p '3001:3001' --rm -v $(pwd)/src:/ui_next/src awx-ui-next
|
||||||
|
```
|
||||||
|
|
||||||
|
**note:** This is for CI, test systems, zuul, etc. For local development, see [usage](https://github.com/ansible/awx/blob/devel/awx/ui_next/README.md#usage)
|
||||||
|
|||||||
@@ -80,7 +80,8 @@ module.exports = {
|
|||||||
hot: true,
|
hot: true,
|
||||||
inline: true,
|
inline: true,
|
||||||
stats: 'minimal',
|
stats: 'minimal',
|
||||||
host: '127.0.0.1',
|
host: '0.0.0.0',
|
||||||
|
disableHostCheck: true,
|
||||||
https: true,
|
https: true,
|
||||||
port: 3001,
|
port: 3001,
|
||||||
clientLogLevel: 'none',
|
clientLogLevel: 'none',
|
||||||
|
|||||||
Reference in New Issue
Block a user