Updated to SDK 2.16.0

This commit is contained in:
thomashii 2022-04-26 08:11:53 +08:00
parent 8facd65c14
commit 563f7f8dde
3 changed files with 23 additions and 150 deletions

View file

@ -1,14 +1,23 @@
FROM google/dart:latest FROM dart:latest
COPY ./ ./ # Copy all the source code
COPY ./config /app/config
COPY ./lib /app/lib
COPY ./bin /app/bin
COPY ./views /app/views
COPY ./web /app/web
COPY ./*.yaml /app/
# Install dependencies, pre-build WORKDIR /app
RUN pub get RUN dart pub upgrade
# Optionally build generaed sources. # Optionally build generated sources.
# RUN pub run build_runner build # RUN pub run build_runner build
# Set environment, start server # Set environment, start server in JIT mode
ENV ANGEL_ENV=production ENV ANGEL_ENV=production
EXPOSE 3000 EXPOSE 3000
CMD dart bin/prod.dart CMD dart ./bin/prod.dart -p 3000 -a 0.0.0.0
# Use -j flag to set higher number of isolates
#CMD dart ./bin/prod.dart -p 3000 -a 0.0.0.0 -j 50

View file

@ -8,8 +8,8 @@ MapService? _getTodoService(Angel app) {
const key = 'todoService'; const key = 'todoService';
// If there is already an existing singleton, return it. // If there is already an existing singleton, return it.
if (app.container!.hasNamed(key)) { if (app.container.hasNamed(key)) {
return app.container!.findByName<MapService>(key); return app.container.findByName<MapService>(key);
} }
// Create an in-memory service. We will use this // Create an in-memory service. We will use this
@ -18,7 +18,7 @@ MapService? _getTodoService(Angel app) {
// Register this service as a named singleton in the app container, // Register this service as a named singleton in the app container,
// so that we do not inadvertently create another instance. // so that we do not inadvertently create another instance.
app.container!.registerNamedSingleton(key, mapService); app.container.registerNamedSingleton(key, mapService);
return mapService; return mapService;
} }

View file

@ -2,7 +2,7 @@ name: angel
description: A graphql starter application for Angel3 framework description: A graphql starter application for Angel3 framework
publish_to: none publish_to: none
environment: environment:
sdk: '>=2.15.0 <3.0.0' sdk: '>=2.16.0 <3.0.0'
dependencies: dependencies:
angel3_auth: ^6.0.0 angel3_auth: ^6.0.0
angel3_configuration: ^6.0.0 angel3_configuration: ^6.0.0
@ -16,145 +16,9 @@ dev_dependencies:
angel3_hot: ^6.0.0 angel3_hot: ^6.0.0
angel3_serialize_generator: ^6.0.0 angel3_serialize_generator: ^6.0.0
angel3_test: ^6.0.0 angel3_test: ^6.0.0
graphql_generator2: ^3.0.0 graphql_generator2: ^4.0.0
belatuk_pretty_logging: ^4.0.0 belatuk_pretty_logging: ^4.0.0
build_runner: ^2.0.4 build_runner: ^2.0.4
io: ^1.0.0 io: ^1.0.0
test: ^1.17.5 test: ^1.21.0
lints: ^1.0.0 lints: ^1.0.0
dependency_overrides:
angel3_container:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/container/angel_container
angel3_framework:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/framework
angel3_http_exception:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/http_exception
angel3_model:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/model
angel3_route:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/route
angel3_mock_request:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/mock_request
angel3_auth:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/auth
angel3_client:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/client
angel3_websocket:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/websocket
angel3_validate:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/validate
angel3_configuration:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/configuration
angel3_test:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/test
jael3:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/jael/jael
angel3_jael:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/jael/angel_jael
jael3_preprocessor:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/jael/jael_preprocessor
angel3_serialize:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/serialize/angel_serialize
angel3_serialize_generator:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/serialize/angel_serialize_generator
angel3_hot:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/hot
angel3_static:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/static
angel3_production:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/production
angel3_orm:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/orm/angel_orm
angel3_orm_generator:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/orm/angel_orm_generator
angel3_orm_postgres:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/orm/angel_orm_postgres
angel3_migration:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/orm/angel_migration
angel3_migration_runner:
git:
url: https://github.com/dukefirehawk/angel.git
ref: release/6.0.0
path: packages/orm/angel_migration_runner
angel3_graphql:
git:
url: https://github.com/dukefirehawk/graphql_dart.git
ref: releaase/6.0.0
path: angel_graphql
graphql_generator2:
git:
url: https://github.com/dukefirehawk/graphql_dart.git
ref: releaase/6.0.0
path: graphql_generator