Builds for
1 pipeline
passed
in
7 minutes 57 seconds
Merge branch 'feature/docker' into develop
Showing
6 changed files
with
77 additions
and
3 deletions
.dockerignore
0 → 100644
docker-compose.yml
0 → 100644
server/Dockerfile
0 → 100644
web/Dockerfile
0 → 100644
1 | +FROM node:14-alpine as build | ||
2 | + | ||
3 | +WORKDIR /usr | ||
4 | + | ||
5 | +COPY common ./common | ||
6 | +COPY web ./web | ||
7 | + | ||
8 | +WORKDIR /usr/common | ||
9 | + | ||
10 | +RUN yarn install | ||
11 | + | ||
12 | +WORKDIR /usr/web | ||
13 | + | ||
14 | +RUN yarn install | ||
15 | +RUN yarn build | ||
16 | + | ||
17 | +FROM nginx:latest | ||
18 | + | ||
19 | +COPY web/default.conf /etc/nginx/conf.d/default.conf | ||
20 | +COPY --from=build /usr/web/build /usr/web/build | ||
21 | + | ||
22 | +EXPOSE 80 | ||
23 | + | ||
24 | +CMD ["nginx", "-g", "daemon off;"] | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
web/default.conf
0 → 100644
1 | -import React from 'react'; | 1 | +import React from "react"; |
2 | -import { io } from 'socket.io-client'; | 2 | +import { io } from "socket.io-client"; |
3 | 3 | ||
4 | -export const socket = io('http://localhost:3000/'); | 4 | +export const socket = io(`http://${window.location.hostname}:3000/`); |
5 | const SocketContext = React.createContext(socket); | 5 | const SocketContext = React.createContext(socket); |
6 | 6 | ||
7 | export const SocketProvider = SocketContext.Provider; | 7 | export const SocketProvider = SocketContext.Provider; | ... | ... |
-
Please register or login to post a comment