Spaces:
Paused
Paused
Merge branch 'main' of github.com:AnujPanthri/HapticLink
Browse files- Dockerfile +6 -2
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
# docker build -t hapticlink .
|
| 2 |
# docker run --name hapticlink -d -p 3000:3000 -e WS_SERVER_URL="ws://localhost:3000" hapticlink
|
| 3 |
|
| 4 |
# Automatically run by hugging face when main get update
|
|
@@ -7,6 +7,10 @@
|
|
| 7 |
# Build Flutter Project
|
| 8 |
FROM cirrusci/flutter:latest AS flutter-builder
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
WORKDIR /client
|
| 11 |
|
| 12 |
# Copies flutter project
|
|
@@ -14,7 +18,7 @@ COPY ./client /client
|
|
| 14 |
|
| 15 |
# Building project
|
| 16 |
RUN flutter pub get
|
| 17 |
-
RUN flutter build web
|
| 18 |
|
| 19 |
# STAGE 2
|
| 20 |
# Install Node Server
|
|
|
|
| 1 |
+
# sudo docker build --build-arg WS_SERVER_URL=ws://localhost:3000 -t hapticlink .
|
| 2 |
# docker run --name hapticlink -d -p 3000:3000 -e WS_SERVER_URL="ws://localhost:3000" hapticlink
|
| 3 |
|
| 4 |
# Automatically run by hugging face when main get update
|
|
|
|
| 7 |
# Build Flutter Project
|
| 8 |
FROM cirrusci/flutter:latest AS flutter-builder
|
| 9 |
|
| 10 |
+
# Define an ARG for the WS_SERVER_URL
|
| 11 |
+
ARG WS_SERVER_URL=ws://localhost:3000
|
| 12 |
+
ENV WS_SERVER_URL=${WS_SERVER_URL}
|
| 13 |
+
|
| 14 |
WORKDIR /client
|
| 15 |
|
| 16 |
# Copies flutter project
|
|
|
|
| 18 |
|
| 19 |
# Building project
|
| 20 |
RUN flutter pub get
|
| 21 |
+
RUN flutter build web --dart-define=WS_SERVER_URL=${WS_SERVER_URL}
|
| 22 |
|
| 23 |
# STAGE 2
|
| 24 |
# Install Node Server
|