Added development mode for webpack
This commit is contained in:
parent
9be28477ed
commit
a82b3a6b24
@ -1,3 +1,6 @@
|
|||||||
.git
|
.git
|
||||||
.vscode
|
.vscode
|
||||||
node_modules
|
node_modules
|
||||||
|
build
|
||||||
|
dist
|
||||||
|
public
|
||||||
|
@ -29,4 +29,5 @@ COPY --from=builder /app/dist ./dist
|
|||||||
COPY --from=builder /app/public ./public
|
COPY --from=builder /app/public ./public
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
EXPOSE 8081
|
||||||
ENTRYPOINT [ "npm", "run", "start" ]
|
ENTRYPOINT [ "npm", "run", "start" ]
|
||||||
|
16
Dockerfile.dev
Normal file
16
Dockerfile.dev
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
FROM node:alpine
|
||||||
|
|
||||||
|
RUN apk add yarn \
|
||||||
|
python \
|
||||||
|
make \
|
||||||
|
g++
|
||||||
|
|
||||||
|
WORKDIR /app/
|
||||||
|
|
||||||
|
COPY package.json yarn.lock /app/
|
||||||
|
RUN yarn install --frozen-lockfile
|
||||||
|
|
||||||
|
COPY tslint.json /app
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
ENTRYPOINT [ "npm", "run", "start:dev" ]
|
@ -246,6 +246,7 @@ const getConfig = module.exports = (env) => {
|
|||||||
devServer: {
|
devServer: {
|
||||||
hot: true,
|
hot: true,
|
||||||
historyApiFallback: true,
|
historyApiFallback: true,
|
||||||
|
host: "0.0.0.0",
|
||||||
port: 8081,
|
port: 8081,
|
||||||
proxy: [{
|
proxy: [{
|
||||||
context: ["/api"], // TODO: update when there is actually an api
|
context: ["/api"], // TODO: update when there is actually an api
|
||||||
|
29
docker-compose.dev.yml
Normal file
29
docker-compose.dev.yml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
web:
|
||||||
|
image: "amikhalev/sprinklers3:dev"
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile.dev
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
- "8081:8081"
|
||||||
|
volumes:
|
||||||
|
- ./app:/app/app
|
||||||
|
- ./common:/app/common
|
||||||
|
- ./server:/app/server
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
- PORT=8080
|
||||||
|
- TYPEORM_CONNECTION=postgres
|
||||||
|
- TYPEORM_HOST=database
|
||||||
|
- TYPEORM_DATABASE=postgres
|
||||||
|
- TYPEORM_USERNAME=postgres
|
||||||
|
- TYPEORM_PASSWORD=8JN4w0UsN5dbjMjNvPe452P2yYOqg5PV
|
||||||
|
# Must specify JWT_SECRET and MQTT_URL
|
||||||
|
|
||||||
|
database:
|
||||||
|
image: "postgres:11-alpine"
|
||||||
|
environment:
|
||||||
|
- POSTGRES_PASSWORD=8JN4w0UsN5dbjMjNvPe452P2yYOqg5PV
|
Loading…
x
Reference in New Issue
Block a user