diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..75b6df4d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +node_modules +.git +.gitignore +.dockerignore +Dockerfile +README.md \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..54622b79 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM node:22 + +ENV ENVIRONMENT=development + +WORKDIR /usr/src/app + +COPY package.json yarn.lock ./ + +COPY . . + +RUN yarn install --verbose + +RUN yarn rename-dev-configs + +EXPOSE 8081 + +# To start the app after building it using `docker build -t better-rail-app .` with docker +# run: `docker run -it -p 8081:8081 better-rail-app yarn start` + +# CMD ["yarn", "start"] \ No newline at end of file diff --git a/android/gradle.properties b/android/gradle.properties index 3f57fedd..9c966f27 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -10,7 +10,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m -org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m +org.gradle.jvmargs=-Xmx1024m -XX:MaxMetaspaceSize=256m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/package.json b/package.json index db44ec18..0777d41c 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,10 @@ "storybook": "start-storybook -p 9001 -c ./storybook", "test": "jest", "adb": "adb reverse tcp:9090 tcp:9090 && adb reverse tcp:3000 tcp:3000 && adb reverse tcp:9001 tcp:9001 && adb reverse tcp:8081 tcp:8081", - "postinstall": "patch-package; node ./bin/postInstall;", + "postinstall": "patch-package && node ./bin/postInstall", "build-ios": "react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios", "build-android": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res", - "rename-dev-configs": "cp ios/GoogleService-Info.development.plist ios/GoogleService-Info.plist; cp android/app/google-services.development.json android/app/google-services.json" + "rename-dev-configs": "cp ios/GoogleService-Info.development.plist ios/GoogleService-Info.plist && cp android/app/google-services.development.json android/app/google-services.json" }, "dependencies": { "@expo/react-native-action-sheet": "4.0.1",