To install Appwrite using Docker with a custom domain, follow these steps:
Ensure that Docker and Docker Compose are installed on your server.
sudo apt update && sudo apt install -y docker.io docker-composeYou can convert your curl command into a PHP script using the curl functions in PHP. Here's an example of how to do it:
<?php
$apiKey = 'YOUR_OPENAI_API_KEY'; // Replace with your actual OpenAI API key
$data = [
"model" => "gpt-4o",
"messages" => [| Future<EpubController> loadEpub() async { | |
| var asset = await PlatformAssetBundle().load("assets/alice.epub"); | |
| return EpubController( | |
| document: EpubDocument.openData(asset.buffer | |
| .asUint8List(asset.offsetInBytes, asset.lengthInBytes))); | |
| } | |
| @override | |
| Widget build(BuildContext context) => FutureBuilder<EpubController>( | |
| future: loadEpub(), |
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({super.key}); | |
| @override |
| import 'package:flutter/material.dart'; | |
| void main() => runApp(const MyApp()); | |
| class MyApp extends StatelessWidget { | |
| const MyApp({super.key}); | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( |
| // Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
| // for details. All rights reserved. Use of this source code is governed by a | |
| // BSD-style license that can be found in the LICENSE file. | |
| import 'package:flutter/material.dart'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| @override |
| GridView.builder( | |
| itemCount: 8, | |
| gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( | |
| crossAxisCount: 2, | |
| mainAxisSpacing: 4, | |
| crossAxisSpacing: 4, | |
| ), | |
| itemBuilder: (context, index) { | |
| return Shimmer.fromColors( | |
| baseColor: Colors.grey.shade200, |
| [ | |
| { | |
| "zipCode": "10100", | |
| "subDistrictList": [ | |
| { | |
| "subDistrictId": "100801", | |
| "districtId": "1008", | |
| "provinceId": "10", | |
| "subDistrictName": "ป้อมปราบ" | |
| }, |
| import 'package:flutter/material.dart'; | |
| class HomePage extends StatefulWidget { | |
| const HomePage({super.key}); | |
| @override | |
| State<HomePage> createState() => _HomePageState(); | |
| } | |
| class _HomePageState extends State<HomePage> { |
| [ | |
| { | |
| "id": 1, | |
| "user": { | |
| "name": "Awesom User", | |
| "avatarUrl": "https://i.pravatar.cc/300" | |
| }, | |
| "content": "Hello", | |
| "type": "text", | |
| "datetime": "2023-10-04 22:10:42" |