diff --git a/Dockerfile b/Dockerfile index 808a6e0..1e9cebc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14.7.0-stretch +FROM node:18-alpine3.17 # Installing yarn RUN apt update -y && \ @@ -11,20 +11,18 @@ ENV MAILGUN_API_KEY=api-key \ MAILGUN_DOMAIN=darkwire.io \ ABUSE_TO_EMAIL_ADDRESS=abuse@darkwire.io \ ABUSE_FROM_EMAIL_ADDRESS="Darkwire " \ - CLIENT_DIST_DIRECTORY='client/dist/path'\ + CLIENT_DIST_DIRECTORY='client/dist/'\ ROOM_HASH_SECRET='some-uuid'\ SITE_URL=https://darkwire.io \ - STORE_BACKEND=redis \ - STORE_HOST=redis://redis:6379 + STORE_BACKEND=memory # Client configuration will be put into client/.env ENV TZ=UTC \ - REACT_APP_API_HOST=localhost \ - REACT_APP_API_PROTOCOL=http \ - REACT_APP_API_PORT=3001 \ - REACT_APP_COMMIT_SHA=some_sha \ - REACT_APP_COMMIT_SHA=some_sha \ - REACT_APP_MAX_FILE_SIZE=4 + VITE_API_HOST=localhost \ + VITE_API_PROTOCOL=http \ + VITE_API_PORT=3001 \ + VITE_COMMIT_SHA=some_sha \ + VITE_MAX_FILE_SIZE=4 COPY --chown=node:node . . @@ -33,7 +31,7 @@ RUN yarn build STOPSIGNAL SIGINT EXPOSE 3001 HEALTHCHECK --interval=30s --timeout=30s --start-period=10s --retries=3 \ - CMD [ "curl", "-f", "${REACT_APP_API_PROTOCOL}://localhost:${REACT_APP_API_PORT}", "||", "exit", "1" ] + CMD [ "curl", "-f", "${VITE_API_PROTOCOL}://localhost:${VITE_API_PORT}", "||", "exit", "1" ] ENTRYPOINT [ "docker-entrypoint.sh" ] CMD ["yarn", "start"] \ No newline at end of file diff --git a/client/tsconfig.json b/client/tsconfig.json index 8a10db2..5a0de64 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -14,7 +14,10 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, - "jsx": "react-jsx" + "jsx": "react-jsx", + "paths": { + "@/*": ["./src/*"] + } }, "include": ["src"], "references": [{ "path": "./tsconfig.node.json" }] diff --git a/package.json b/package.json index 56dce51..728ec77 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "license": "MIT", "scripts": { "build": "./build.sh", - "start": "cd server && CLIENT_DIST_DIRECTORY='../client/build' yarn start", + "start": "cd server && CLIENT_DIST_DIRECTORY='../client/dist' yarn start", "setup": "yarn && cd client && yarn && cd ../server && yarn", "dev": "concurrently 'cd client && yarn dev' 'cd server && yarn dev'", "test": "concurrently 'cd client && yarn coverage' 'cd server && yarn test --watch=false'",