mirror of
https://github.com/apotdevin/thunderhub.git
synced 2025-02-22 06:21:37 +01:00
chore: docker cleanup and changes
This commit is contained in:
parent
a9df78ac2d
commit
22bbf2665b
4 changed files with 11 additions and 14 deletions
4
client/.gitignore
vendored
4
client/.gitignore
vendored
|
@ -11,8 +11,12 @@
|
|||
# production
|
||||
/build
|
||||
|
||||
#webpack
|
||||
/dist
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.env
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# stage: 1
|
||||
FROM node:11-alpine as build
|
||||
|
||||
WORKDIR /usr/src/client
|
||||
|
@ -10,9 +9,6 @@ RUN yarn install --production=true
|
|||
COPY . /usr/src/client
|
||||
RUN yarn build
|
||||
|
||||
# stage: 2 — the production environment
|
||||
FROM nginx:alpine
|
||||
COPY /config/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build /usr/src/client/build /usr/share/nginx/html/
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
RUN yarn global add serve
|
||||
|
||||
CMD ["serve", "-s", "build"]
|
|
@ -24,10 +24,7 @@ const ContentView = React.lazy(() => import('./sections/content/Content'));
|
|||
toast.configure({ draggable: false });
|
||||
|
||||
const client = new ApolloClient({
|
||||
uri:
|
||||
process.env.NODE_ENV === 'development'
|
||||
? 'http://localhost:3001'
|
||||
: 'https://api.thunderhub.io/',
|
||||
uri: process.env.REACT_APP_API_URL ?? 'http://localhost:3001',
|
||||
});
|
||||
|
||||
const ContextApp: React.FC = () => {
|
||||
|
|
|
@ -4,6 +4,7 @@ services:
|
|||
### SETUP SERVER CONTAINER
|
||||
##########################
|
||||
backend:
|
||||
image: apotdevin/thunderhub-server
|
||||
build:
|
||||
context: ./server
|
||||
dockerfile: Dockerfile
|
||||
|
@ -18,13 +19,12 @@ services:
|
|||
### SETUP CLIENT CONTAINER
|
||||
##########################
|
||||
frontend:
|
||||
image: apotdevin/thunderhub-client
|
||||
build:
|
||||
context: ./client
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
ports:
|
||||
- "80:80"
|
||||
- "5000:5000"
|
||||
volumes:
|
||||
- ./client/
|
||||
depends_on:
|
||||
|
|
Loading…
Add table
Reference in a new issue