From 13a6c08b4f84079dd139f6cd4e285e8d8ce7c555 Mon Sep 17 00:00:00 2001 From: Axe7bravo <106402398+Axe7bravo@users.noreply.github.com> Date: Fri, 1 Jul 2022 23:54:33 +0200 Subject: [PATCH 1/3] Docker build --- .devcontainer/Dockerfile | 16 ++++++++++++++++ .devcontainer/devcontainer.json | 16 ++++++++++++++++ android/app/src/main/AndroidManifest.xml | 2 +- android/app/src/profile/AndroidManifest.xml | 2 +- lib/main.dart | 2 +- 5 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..09e63d4 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,16 @@ +FROM ubuntu:18.04 + +# Prerequisites +RUN apt update && apt install -y curl git unzip xz-utils zip libglu1-mesa openjdk-8-jdk wget + +# Set up new user +RUN useradd -ms /bin/bash developer +USER developer +WORKDIR /home/developer + +# Download Flutter SDK +RUN git clone https://github.com/flutter/flutter.git +ENV PATH "$PATH:/home/developer/flutter/bin" + +# Run basic check to download Dark SDK +RUN flutter doctor diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..81ae550 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,16 @@ +{ + "name": "JS ENV", + "dockerFile": "Dockerfile", + "appPort": [3000], + "runArgs": ["-u", "node"], + "settings": { + "workbench.colorTheme": "Cobalt2", + "terminal.intergrated.shell.linux": "/bin/bash" + }, + "postCreateCommand": "npm install", + "extensions": [ + "esbenp.prettier-vscode", + "wesbos.theme.cobalt2", + ] + +} \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index eb23bfb..35a8c1d 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.emmkay.delivery"> diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml index ac61eed..2412d10 100644 --- a/android/app/src/profile/AndroidManifest.xml +++ b/android/app/src/profile/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.emmkay.delivery"> diff --git a/lib/main.dart b/lib/main.dart index 2f02b0d..dcf6457 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -70,7 +70,7 @@ class _MyAppState extends State { ], child: MaterialApp( debugShowCheckedModeBanner: false, - title: 'Food - Fraved', + title: 'Emmkay Delivery', home: CheckingLoginPage(), ), ); From ec57be0b1f29b27838bfb2c454571cca38262b4a Mon Sep 17 00:00:00 2001 From: Axe7bravo <106402398+Axe7bravo@users.noreply.github.com> Date: Wed, 6 Jul 2022 17:22:40 +0000 Subject: [PATCH 2/3] Add devcontainer dot JSON --- .devcontainer/DockerFile | 3 ++ .devcontainer/Dockerfile | 16 ---------- .devcontainer/devcontainer.json | 40 ++++++++++++++++-------- android/app/src/main/AndroidManifest.xml | 2 +- flutter | 1 + lib/Controller/MapBoxController.dart | 2 +- lib/Services/GoogleServices.dart | 2 +- 7 files changed, 34 insertions(+), 32 deletions(-) create mode 100644 .devcontainer/DockerFile delete mode 100644 .devcontainer/Dockerfile create mode 160000 flutter diff --git a/.devcontainer/DockerFile b/.devcontainer/DockerFile new file mode 100644 index 0000000..f1ce2fa --- /dev/null +++ b/.devcontainer/DockerFile @@ -0,0 +1,3 @@ +FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:latest + + diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 09e63d4..0000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM ubuntu:18.04 - -# Prerequisites -RUN apt update && apt install -y curl git unzip xz-utils zip libglu1-mesa openjdk-8-jdk wget - -# Set up new user -RUN useradd -ms /bin/bash developer -USER developer -WORKDIR /home/developer - -# Download Flutter SDK -RUN git clone https://github.com/flutter/flutter.git -ENV PATH "$PATH:/home/developer/flutter/bin" - -# Run basic check to download Dark SDK -RUN flutter doctor diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 81ae550..68a2219 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,16 +1,30 @@ { - "name": "JS ENV", - "dockerFile": "Dockerfile", - "appPort": [3000], - "runArgs": ["-u", "node"], - "settings": { - "workbench.colorTheme": "Cobalt2", - "terminal.intergrated.shell.linux": "/bin/bash" - }, - "postCreateCommand": "npm install", - "extensions": [ - "esbenp.prettier-vscode", - "wesbos.theme.cobalt2", - ] + "name": "EmmKay", + "build": { + "dockerfile": "Dockerfile", + // Update 'VARIANT' to pick a Node version: 18, 16, 14. + // Append -bullseye or -buster to pin to an OS version. + // Use -bullseye variants on local arm64/Apple Silicon. + + }, + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "dbaeumer.vscode-eslint" + ] + } + }, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "yarn install", + + // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "node" } \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 35a8c1d..d622647 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -34,7 +34,7 @@ android:requestLegacyExternalStorage="true" android:icon="@mipmap/ic_launcher"> + android:value="AIzaSyDs7PkTKOmzPIYH5UDOAY_E8kD-QxYHRrQ"/> getCoordsOriginAndDestinationDelivery(LatLng origin, LatLng destination) async { diff --git a/lib/Services/GoogleServices.dart b/lib/Services/GoogleServices.dart index abb785d..d456f3b 100644 --- a/lib/Services/GoogleServices.dart +++ b/lib/Services/GoogleServices.dart @@ -1,3 +1,3 @@ library restaurant.googlemapsapi; -String googleMapsAPI = "AIzaSyAA6NAaCO_wqNsUjjp86q8JcTBoQZRtW20"; \ No newline at end of file +String googleMapsAPI = "AIzaSyDs7PkTKOmzPIYH5UDOAY_E8kD-QxYHRrQ"; \ No newline at end of file From 21a2cd5f6694a5583b5c67909a6455f526a892e3 Mon Sep 17 00:00:00 2001 From: Axe7bravo <106402398+Axe7bravo@users.noreply.github.com> Date: Wed, 6 Jul 2022 18:14:49 +0000 Subject: [PATCH 3/3] figured out how to add ENV variables --- .devcontainer/DockerFile | 3 --- .devcontainer/devcontainer.json | 30 ------------------------------ .docker/Dockerfile.devenv | 9 +++++++++ .docker/config.json | 3 +++ 4 files changed, 12 insertions(+), 33 deletions(-) delete mode 100644 .devcontainer/DockerFile delete mode 100644 .devcontainer/devcontainer.json create mode 100644 .docker/Dockerfile.devenv create mode 100644 .docker/config.json diff --git a/.devcontainer/DockerFile b/.devcontainer/DockerFile deleted file mode 100644 index f1ce2fa..0000000 --- a/.devcontainer/DockerFile +++ /dev/null @@ -1,3 +0,0 @@ -FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:latest - - diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 68a2219..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "EmmKay", - "build": { - "dockerfile": "Dockerfile", - // Update 'VARIANT' to pick a Node version: 18, 16, 14. - // Append -bullseye or -buster to pin to an OS version. - // Use -bullseye variants on local arm64/Apple Silicon. - - }, - - // Configure tool-specific properties. - "customizations": { - // Configure properties specific to VS Code. - "vscode": { - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "dbaeumer.vscode-eslint" - ] - } - }, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "yarn install", - - // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. - "remoteUser": "node" -} \ No newline at end of file diff --git a/.docker/Dockerfile.devenv b/.docker/Dockerfile.devenv new file mode 100644 index 0000000..dcbe10c --- /dev/null +++ b/.docker/Dockerfile.devenv @@ -0,0 +1,9 @@ +FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:latest + +RUN useradd -s /bin/bash -m vscode \ + && groupadd docker \ + && usermod -aG docker vscode + +USER vscode + + diff --git a/.docker/config.json b/.docker/config.json new file mode 100644 index 0000000..5f937e0 --- /dev/null +++ b/.docker/config.json @@ -0,0 +1,3 @@ +{ + "dockerfile": "Dockerfile.devenv" +} \ No newline at end of file