Skip to content

Commit fe00b0e

Browse files
committed
Version 3 - hold onto your butts
0 parents  commit fe00b0e

File tree

4,229 files changed

+577913
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,229 files changed

+577913
-0
lines changed

.dockerignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.git
2+
.dockerignore
3+
app/storage/logs/*
4+
app/storage/views/*
5+
vendor/*

.env.example

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# --------------------------------------------
2+
# REQUIRED: BASIC APP SETTINGS
3+
# --------------------------------------------
4+
APP_ENV=production
5+
APP_DEBUG=false
6+
APP_KEY=ChangeMe
7+
APP_URL=null
8+
APP_TIMEZONE='US/Pacific'
9+
APP_LOCALE=en
10+
11+
12+
# --------------------------------------------
13+
# REQUIRED: DATABASE SETTINGS
14+
# --------------------------------------------
15+
DB_CONNECTION=mysql
16+
DB_HOST=localhost
17+
DB_DATABASE=null
18+
DB_USERNAME=null
19+
DB_PASSWORD=null
20+
21+
22+
# --------------------------------------------
23+
# REQUIRED: OUTGOING MAIL SERVER SETTINGS
24+
# --------------------------------------------
25+
MAIL_DRIVER=smtp
26+
MAIL_HOST=email-smtp.us-west-2.amazonaws.com
27+
MAIL_PORT=587
28+
MAIL_USERNAME=YOURUSERNAME
29+
MAIL_PASSWORD=YOURPASSWORD
30+
MAIL_ENCRYPTION=null
31+
MAIL_FROM_ADDR=[email protected]
32+
MAIL_FROM_NAME=Snipe-IT
33+
34+
35+
# --------------------------------------------
36+
# REQUIRED: IMAGE LIBRARY
37+
# This should be gd or imagick
38+
# --------------------------------------------
39+
IMAGE_LIB=gd
40+
41+
42+
# --------------------------------------------
43+
# OPTIONAL: SESSION SETTINGS
44+
# --------------------------------------------
45+
SESSION_LIFETIME=12000
46+
EXPIRE_ON_CLOSE=false
47+
ENCRYPT=false
48+
COOKIE_NAME=snipeit_session
49+
COOKIE_DOMAIN=null
50+
SECURE_COOKIES=false
51+
52+
53+
# --------------------------------------------
54+
# OPTIONAL: CACHE SETTINGS
55+
# --------------------------------------------
56+
CACHE_DRIVER=file
57+
SESSION_DRIVER=file
58+
QUEUE_DRIVER=sync
59+
60+
61+
# --------------------------------------------
62+
# OPTIONAL: AWS S3 SETTINGS
63+
# --------------------------------------------
64+
AWS_SECRET=null
65+
AWS_KEY=null
66+
AWS_REGION=null
67+
AWS_BUCKET=null
68+
69+
70+
# --------------------------------------------
71+
# OPTIONAL: MISC
72+
# --------------------------------------------
73+
APP_LOG=single
74+
APP_LOCKED=false
75+
FILESYSTEM_DISK=local

.env.testing

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# --------------------------------------------
2+
# REQUIRED: BASIC APP SETTINGS
3+
# --------------------------------------------
4+
APP_ENV=testing-ci
5+
APP_DEBUG=true
6+
APP_KEY=ChangeMe
7+
APP_URL=null
8+
APP_TIMEZONE='US/Pacific'
9+
APP_LOCALE=en
10+
FILESYSTEM_DISK=local
11+
12+
# --------------------------------------------
13+
# REQUIRED: DATABASE SETTINGS
14+
# --------------------------------------------
15+
DB_CONNECTION=sqlite
16+
DB_HOST=localhost
17+
DB_DATABASE=sqlite_testing.sqlite
18+
DB_USERNAME=null
19+
DB_PASSWORD=null
20+
21+
# --------------------------------------------
22+
# REQUIRED: OUTGOING MAIL SERVER SETTINGS
23+
# --------------------------------------------
24+
MAIL_DRIVER=smtp
25+
MAIL_HOST=email-smtp.us-west-2.amazonaws.com
26+
MAIL_PORT=587
27+
MAIL_USERNAME=YOURUSERNAME
28+
MAIL_PASSWORD=YOURPASSWORD
29+
MAIL_ENCRYPTION=null
30+
MAIL_FROM_ADDR=[email protected]
31+
MAIL_FROM_NAME=Snipe-IT
32+
33+
# --------------------------------------------
34+
# REQUIRED: IMAGE LIBRARY
35+
# This should be gd or imagick
36+
# --------------------------------------------
37+
IMAGE_LIB=gd
38+
39+
40+
# --------------------------------------------
41+
# OPTIONAL: AWS S3 SETTINGS
42+
# --------------------------------------------
43+
AWS_SECRET=null
44+
AWS_KEY=null
45+
AWS_REGION=null
46+
AWS_BUCKET=null
47+
48+
49+
# --------------------------------------------
50+
# OPTIONAL: CACHE SETTINGS
51+
# --------------------------------------------
52+
CACHE_DRIVER=file
53+
SESSION_DRIVER=file
54+
QUEUE_DRIVER=sync
55+
56+
57+
# --------------------------------------------
58+
# OPTIONAL: SESSION SETTINGS
59+
# --------------------------------------------
60+
SESSION_LIFETIME=12000
61+
EXPIRE_ON_CLOSE=false
62+
ENCRYPT=false
63+
COOKIE_NAME=snipeit_session
64+
COOKIE_DOMAIN=null
65+
SECURE_COOKIES=false
66+
67+
68+
# --------------------------------------------
69+
# OPTIONAL: APP LOG FORMAT
70+
# --------------------------------------------
71+
APP_LOG=single

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.github/ISSUE_TEMPLATE.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#### Expected Behavior (or desired behavior if a feature request)
2+
3+
(what you expect to happen goes here)
4+
5+
-----
6+
7+
#### Actual Behavior
8+
9+
(what actually happens goes here)
10+
11+
-----
12+
13+
#### Please confirm you have done the following before posting your bug report:
14+
15+
- [ ] I have enabled debug mode
16+
- [ ] I have read [checked the Common Issues page](http://docs.snipeitapp.com/common-issues.html)
17+
18+
-----
19+
#### Please provide answers to these questions before posting your bug report:
20+
21+
- Version of Snipe-IT you're running
22+
- What OS and web server you're running Snipe-IT on
23+
- What method you used to install Snipe-IT (install.sh, manual installation, docker, etc)
24+
- If you're getting an error in your browser, include that error
25+
- What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error
26+
- If a stacktrace is provided in the error, include that too.
27+
- Any errors that appear in your browser's error console.
28+
- Confirm whether the error is [reproduceable on the demo](https://snipeitapp.com/demo).
29+
- Include any additional information you can find in `app/storage/logs` and your webserver's logs.
30+
- Include what you've done so far in the installation, and if you got any error messages along the way.
31+
- Indicate whether or not you've manually edited any data directly in the database

.gitignore

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/vendor
2+
/node_modules
3+
Homestead.yaml
4+
Homestead.json
5+
.env
6+
7+
tests/_output/*
8+
.DS_Store
9+
public/uploads/models/*
10+
public/uploads/avatars/*
11+
public/uploads/suppliers/*
12+
public/uploads/assets/*
13+
public/uploads/*.gif
14+
public/uploads/*.jpg
15+
public/uploads/*.png
16+
public/uploads/*.tif
17+
public/uploads/*.svg
18+
storage/app/private_uploads/users/*
19+
phpDocumentor.phar
20+
output
21+
tests/_support/_generated/*
22+
23+
24+
/bootstrap/compiled.php
25+
composer.phar
26+
/app/config/database.php
27+
/app/config/mail.php
28+
/app/database/*.sqlite
29+
/app/storage/meta/services.json
30+
/app/config/*/mail.php
31+
/app/config/*/session.php
32+
/app/config/*/database.php
33+
/app/config/*/app.php
34+
/app/config/*/ldap.php
35+
public/packages/*
36+
/app/storage/views/*
37+
/app/storage/logs/*
38+
/app/storage/debugbar/
39+
/bin/
40+
.idea
41+
crowdin.yaml
42+
public/uploads/logo.gif
43+
public/uploads/logo.png
44+
.siteflow
45+
public/assets/.siteflow
46+
app/config/local/session.php
47+
.couscous
48+
app/storage/dumps/*
49+
tests/_data/scenarios

.travis.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
addons:
2+
hosts:
3+
- localhost
4+
sudo: false
5+
6+
# see http://about.travis-ci.org/docs/user/languages/php/ for more hints
7+
language: php
8+
9+
# list any PHP version you want to test against
10+
php:
11+
- 5.5
12+
- 5.6
13+
- 7.0
14+
15+
# optionally specify a list of environments, for example to test different RDBMS
16+
env:
17+
- DB=sqlite
18+
19+
# execute any number of scripts before the test run, custom env's are available as variables
20+
before_script:
21+
# - php -S localhost:8000 &
22+
- phantomjs --webdriver=4444 &
23+
- sleep 10
24+
- touch database/testing.sqlite
25+
- composer self-update
26+
- composer install -n --prefer-source
27+
- cp .env.testing .env
28+
- chmod -R 777 storage
29+
- php artisan migrate --database=sqlite_testing --force
30+
- ./vendor/bin/codecept build
31+
- php artisan key:generate
32+
- php artisan db:seed --database=sqlite_testing --force
33+
- php artisan admin:create --first_name=Alison --last_name=Foobar [email protected] --username=snipe --password=password
34+
- php artisan serve --port=8000 --host=localhost &
35+
- sleep 5
36+
- pip install --user codecov
37+
- sleep 5
38+
39+
40+
41+
# omitting "script:" will default to phpunit
42+
# use the $DB env variable to determine the phpunit.xml to use
43+
# script: ./vendor/bin/codecept run --env testing-ci <-- this doesn't work
44+
# script: ./vendor/bin/codecept run unit
45+
script: ./vendor/bin/codecept run
46+
47+
after_success:
48+
- codecov
49+
50+
after_failure:
51+
- cat tests/_output/AccessoriesCept.fail.html
52+
# - curl http://localhost:4444
53+
- curl http://localhost:8000
54+
# configure notifications (email, IRC, campfire etc)
55+
notifications:
56+
email: false
57+
slack:
58+
secure: vv9we1RxB9RsrMbomSdq6D7vz/okobw87pEkgIZjB+hj1QpQ2by90gsPsOa+NgsJEFaEP7e4KlT6SH8kK+zhbmuKaUd3d1//XdcancE22LZXi6tkiB5yuR/Jhhb1LLDqyGJTB4D92hMnnCPiUjpxNA3r437ttNeYRdYIEEP3drA=
59+
webhooks:
60+
urls:
61+
- https://webhooks.gitter.im/e/5e136eb0c1965f3918d0
62+
on_success: change # options: [always|never|change] default: always
63+
on_failure: change # options: [always|never|change] default: always
64+
on_start: false # default: false

Dockerfile

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
FROM ubuntu
2+
MAINTAINER Brady Wetherington <[email protected]>
3+
4+
RUN apt-get update && apt-get install -y \
5+
apache2-bin \
6+
libapache2-mod-php5 \
7+
php5-curl \
8+
php5-ldap \
9+
php5-mysql \
10+
php5-mcrypt \
11+
php5-gd \
12+
patch \
13+
curl \
14+
vim \
15+
git
16+
17+
RUN php5enmod mcrypt
18+
RUN php5enmod gd
19+
20+
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php5/apache2/php.ini
21+
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php5/cli/php.ini
22+
23+
RUN useradd --uid 1000 --gid 50 docker
24+
25+
RUN echo export APACHE_RUN_USER=docker >> /etc/apache2/envvars
26+
RUN echo export APACHE_RUN_GROUP=staff >> /etc/apache2/envvars
27+
28+
COPY docker/000-default.conf /etc/apache2/sites-enabled/000-default.conf
29+
30+
#SSL
31+
COPY docker/001-default-ssl.conf /etc/apache2/sites-enabled/001-default-ssl.conf
32+
#COPY docker/001-default-ssl.conf /etc/apache2/sites-available/001-default-ssl.conf
33+
34+
RUN a2enmod ssl
35+
#RUN a2ensite 001-default-ssl.conf
36+
37+
COPY . /var/www/html
38+
39+
RUN a2enmod rewrite
40+
41+
############ INITIAL APPLICATION SETUP #####################
42+
43+
WORKDIR /var/www/html
44+
45+
#Append to bootstrap file (less brittle than 'patch')
46+
RUN sed -i 's/return $app;/$env="production";\nreturn $app;/' bootstrap/start.php
47+
48+
#copy all configuration files
49+
COPY docker/*.php /var/www/html/app/config/production/
50+
51+
RUN chown -R docker /var/www/html
52+
53+
############## DEPENDENCIES via COMPOSER ###################
54+
55+
#global install of composer
56+
RUN cd /tmp;curl -sS https://getcomposer.org/installer | php;mv /tmp/composer.phar /usr/local/bin/composer
57+
58+
# Get dependencies
59+
RUN cd /var/www/html;composer install
60+
61+
############### APPLICATION INSTALL/INIT #################
62+
63+
#RUN php artisan app:install
64+
# too interactive! Try something else
65+
66+
#COPY docker/app_install.exp /tmp/app_install.exp
67+
#RUN chmod +x /tmp/app_install.exp
68+
#RUN /tmp/app_install.exp
69+
70+
##### START SERVER
71+
72+
COPY docker/entrypoint.sh /entrypoint.sh
73+
RUN chmod +x /entrypoint.sh
74+
75+
ENTRYPOINT ["/entrypoint.sh"]
76+
77+
EXPOSE 80
78+
EXPOSE 443

0 commit comments

Comments
 (0)