This repository has been archived by the owner on Mar 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
README.md
55 lines (42 loc) · 1.48 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# simple_pub_server
[![Build Status](https://cloud.drone.io/api/badges/v7lin/simple_pub_server/status.svg)](https://cloud.drone.io/v7lin/simple_pub_server)
[![Docker Pulls](https://img.shields.io/docker/pulls/v7lin/simple_pub_server.svg)](https://hub.docker.com/r/v7lin/simple_pub_server)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/v7lin/simple_pub_server/blob/master/LICENSE)
Dart private [pub_server](https://github.com/dart-lang/pub_server)
### usage
docker-compose.yml
````
# 版本
version: "3.7"
# 服务
services:
simple_pub_server:
container_name: simple_pub_server
image: v7lin/simple_pub_server:0.1.5
restart: always
ports:
- 8080:8080
volumes:
- ../dev-ops-repo/simple_pub_server:/tmp/package-db
environment:
- TZ=${TIME_ZONE:-Asia/Shanghai}
- PUB_SERVER_REPOSITORY_DATA=/tmp/package-db
- PUB_SERVER_STANDALONE=true
````
### push dart packages or flutter packages/plugins to private pub_server
````
# dart
pub publish --server http://${your domain}
# flutter
flutter packages pub publish --server http://${your pub_server domain}
````
[China - Shadowsocks](https://blog.haitanyule.com/2019-02-27/flutter/)
### import dart packages or flutter packages/plugins from private pub_server
[Pub-Dependencies](https://www.dartlang.org/tools/pub/dependencies)
````
test:
hosted:
name: test # name of your package/plugin
url: http://${your pub_server domain}
version: ^0.0.1
````