diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..e69de29 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/api/.dockerignore b/api/.dockerignore new file mode 100644 index 0000000..d7e4614 --- /dev/null +++ b/api/.dockerignore @@ -0,0 +1,2 @@ +.stack-work +dist-newstyle diff --git a/api/.gitignore b/api/.gitignore index 4d207b7..5cbc5fc 100644 --- a/api/.gitignore +++ b/api/.gitignore @@ -1,2 +1,3 @@ .stack-work +dist-newstyle diff --git a/api/Dockerfile b/api/Dockerfile index 9e99996..00ab234 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,8 +1,9 @@ FROM haskell:8 +WORKDIR /opt/aeris RUN cabal update COPY ./aeris.cabal /opt/aeris/aeris.cabal RUN cabal build --only-dependencies -j4 COPY . /opt/aeris RUN cabal install -CMD ["aeris"] +CMD aeris diff --git a/api/aeris.cabal b/api/aeris.cabal index 2247dbf..6cc16ea 100644 --- a/api/aeris.cabal +++ b/api/aeris.cabal @@ -39,7 +39,7 @@ library , warp default-language: Haskell2010 -executable aeris-exe +executable aeris main-is: Main.hs other-modules: Paths_aeris diff --git a/docker-compose.yml b/docker-compose.yml index 66ddd18..34fbfcd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,15 +9,21 @@ services: - "${POSTGRES_PORT}:5432" mobile: build: ./mobile - front: - build: ./front - ports: - - "80:80" - depends_on: - - "mobile" - back: - build: ./back + volumes: + - apk:/dist + # front: + # build: ./web + # ports: + # - "80:80" + # depends_on: + # - "mobile" + api: + build: ./api ports: - "3000:81" depends_on: - "db" + +volumes: + apk: + diff --git a/mobile/.dockerignore b/mobile/.dockerignore new file mode 100644 index 0000000..45f80f3 --- /dev/null +++ b/mobile/.dockerignore @@ -0,0 +1,5 @@ +.gitignore +Dockerfile +README.md +.dart-tool +build diff --git a/mobile/Dockerfile b/mobile/Dockerfile new file mode 100644 index 0000000..ebdb0aa --- /dev/null +++ b/mobile/Dockerfile @@ -0,0 +1,8 @@ +FROM mingc/android-build-box:latest +COPY pubspec.* ./ +RUN flutter pub get + +COPY . . +RUN flutter build apk lib/src/main.dart --no-pub +RUN find . +CMD mv ./build/app/outputs/flutter-apk/app-release.apk /dist/aeris_android.apk diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml index 19d8ab6..82dd14b 100644 --- a/mobile/pubspec.yaml +++ b/mobile/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.16.0-134.0.dev <3.0.0" + sdk: ">=2.12.0 <3.0.0" # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions