• Stars
    star
    115
  • Rank 304,528 (Top 7 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 10 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A very simple PHP NuGet server

Simple NuGet Server

A very simple NuGet server for my personal use, similar to NuGet.Server but in PHP. Designed for scenarios where a single user (ie. a person or a build server) pushes packages.

Features

  • Basic searching and listing of packages
  • Pushing via NuGet command line (NuGet.exe)
  • Simple set up
  • Stores data in SQLite or MySQL database
  • Uses a single API key (so not suitable for scenarios where multiple users need to be able to push packages)

Setup

For a Debian-based distro (including Ubuntu), installation is something along the lines of what I've written below. Installation using other Linux distributions will vary but it should be pretty similar.

1 - Ensure all dependencies are installed:

  • A web server (Nginx, Apache, Cherokee, etc.)
  • PHP 5.4+ or HHVM
  • SQLite, XML, and Zip extensions (bundled with HHVM, or apt-get install php5-sqlite for PHP 5, or apt-get install php7.0-sqlite php7.0-xml php7.0-zip for PHP 7)

Note: If using Nginx, please make sure ngx_http_dav_module is installed. This is required to enable HTTP PUT support.

2 - Copy app to your server, you could do a Git clone on the server or add it as a Git submodule if adding to a site that's already managed via Git:

cd /var/www
git clone https://github.com/Daniel15/simple-nuget-server.git
# Make db and packages directories writable
chown www-data:www-data db packagefiles
chmod 0770 db packagefiles

3 - Ensure you have a PHP 5.4+ or HHVM upstream configured. For example, in /etc/nginx/conf.d/php.conf:

upstream php {
    server unix:/var/run/php7.2-fpm.sock;
}

4 - Copy nginx.conf.example to /etc/nginx/sites-available/nuget and modify it for your environment:

  • Change example.com to your domain name
  • Change /var/www/simple-nuget-server/ to the checkout directory
  • Change "php" to the name of a PHP upstream in your Nginx config, configured in step 3. This can be regular PHP 5.4+ or HHVM.
  • If hosting as part of another site, prefix everything with a subdirectory and combine the config with your existing site's config (see ReactJS.NET config at the end of this comment)

5 - Edit inc/config.php and change ChangeThisKey to a randomly-generated string

6 - Enable the site (if creating a new site)

ln -s /etc/nginx/sites-available/nuget /etc/nginx/sites-enabled/nuget
/etc/init.d/nginx reload

7 - Set the API key and test it out. I test using nuget.exe (which is required for pushing)

nuget.exe setApiKey -Source http://example.com/ ChangeThisKey
nuget.exe push Foo.nupkg -Source http://example.com/

(if using Mono, run mono nuget.exe instead)

Licence

(The MIT licence)

Copyright (C) 2014 Daniel Lo Nigro (Daniel15)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

RouteJs

JavaScript URL routing for ASP.NET MVC and WebForms
C#
83
star
2

dnstools

Source code for dnstools.ws - DNS lookups, pings, and traceroutes from 20 locations worldwide
TypeScript
71
star
3

BuildSize

Automatically track the size of your build artifacts
PHP
54
star
4

Kohana-Membership

OpenID / Facebook / Twitter login module for Kohana. Example at http://stuff.dan.cx/php/login/
PHP
50
star
5

JSPool

Pooling of reusable JavaScript engines for fast, performant scripting integration in in .NET applications
C#
36
star
6

pmacct-frontend

Weekly and monthly traffic statistics grouped per IP
PHP
29
star
7

prometheus-net.SystemMetrics

Export system metrics (CPU usage, disk usage, etc) to Prometheus from your .NET app
C#
29
star
8

Website

Source code for my personal website (https://d.sb/) and blog.
C#
27
star
9

urql-persisted-queries

urql exchange that implements Apollo-style Automatic Persisted Queries
TypeScript
27
star
10

Sharpamp

Sharpamp allows you to easily write Winamp plugins in C# - Migrated from Google Code
C#
24
star
11

SecureSign

Simple, secure Authenticode and GPG code signing server
C#
21
star
12

rTorrentWeb

Web-based frontend for rTorrent - Migrated from old Trac website
PHP
18
star
13

SrcBrowse

Basic webapp for browsing the contents of a source map file
JavaScript
17
star
14

LazySentry

Example code to lazy load Sentry using ES2020 import()
TypeScript
13
star
15

fdk-dotnet

FnProject FDK for C# / .NET Core
C#
13
star
16

WebpackTag

ASP.NET Core Tag Helper for Webpack assets
C#
11
star
17

Kohana-Membership-Example

Example of the Kohana-Membership module. See http://stuff.dan.cx/php/login/ for live example
PHP
7
star
18

SocialFeeds

Social feed aggregator - Aggregate various feeds from various websites into a single embeddable feed
PHP
7
star
19

JSFramework

Yet another simple JavaScript framework
JavaScript
5
star
20

sites

🌐 ⚡ Super simple static sites
JavaScript
5
star
21

EFExample

An example of how to use Entity Framework 6 in ASP.NET 5
C#
4
star
22

zurl

zURL is a URL shortener
PHP
4
star
23

NodeWhiteboard

A simple SVG whiteboard using Node.js and Raphael
JavaScript
4
star
24

ndephp

Automatically exported from code.google.com/p/ndephp
PHP
3
star
25

wedding-site

Website for my wedding
CSS
2
star
26

NamedRegExp

Simple implementation of named capturing groups in JavaScript RegExps
JavaScript
2
star
27

DanPHPSupport

Imported from SourceForge CVS
PHP
2
star
28

SimpleScreenshot

A simple Bash script to take and upload a screenshot
Shell
2
star
29

Google

¯\_(ツ)_/¯
1
star
30

SimpleIdentity

Simple ASP.NET Core authentication and identity provider. Valid users are specified in a simple configuration file.
C#
1
star
31

AjaXplorer-Azure

Plugin for AjaXPlorer that allows browsing of Windows Azure Blob Storage
PHP
1
star
32

IE-button-fix

Fix for handling of <button> tags in IE 6 and 7
JavaScript
1
star
33

daniel15.github.com

1
star
34

Test

Daniel's Test Github Thingy
1
star
35

Downcast

Basic downloader for podcast-style feeds, eg. from Soundcloud or iTunes.
C#
1
star
36

Kohana-Daniel15

Daniel15's Kohana module - Basic stuff I use in most of my Kohana projects
JavaScript
1
star
37

NTelepathy

C#/.NET bindings for the Telepathy communications framework
C#
1
star
38

MySpace-Export

Export your photos from MySpace
C#
1
star
39

PrototypeMvcNet

ASP.NET MVC unobtrusive AJAX support library for Prototype
JavaScript
1
star
40

Banshee-StatusUpdater

Show your currently playing music in your Telepathy / Empathy status
C#
1
star
41

MetlinkPHP

Access the Metlink Melbourne Journey Planner API via PHP. Potentially works for other EFA9-based journey planners too.
PHP
1
star
42

SPFFlatten

SPF flattening using AutoSPF and PowerDNS
C#
1
star
43

WebCamControl

Control pan, tilt, zoom, etc for webcams. Linux alternative to Insta360 Link Controller.
C#
1
star