-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure repository, add support for Docker.
- Loading branch information
Showing
8 changed files
with
127 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
photod-backend | ||
photod-frontend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Changelog | ||
|
||
## v0.0.1 | ||
Released 25 July 2017 | ||
|
||
Highlights: | ||
* Initial preview release. | ||
|
||
The full list of commits can be found [here](https://github.com/basilfx/Photod/compare/b25a100326da1cfc2127e60f940c10f4ba6a34e7...v0.0.1). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM ubuntu:17.04 | ||
|
||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y curl git apt-utils | ||
|
||
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - | ||
|
||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y build-essential gdal-bin libavcodec-dev \ | ||
libavdevice-dev libavfilter-dev libavformat-dev libavresample-dev \ | ||
libavutil-dev libboost-python-dev libjpeg-dev libleptonica-dev \ | ||
libsqlite3-mod-spatialite libswscale-dev libtesseract-dev nodejs \ | ||
python3 python3-dev python3-pip python3-venv tesseract-ocr \ | ||
tesseract-ocr-all && \ | ||
npm install -g yarn | ||
|
||
RUN apt-get clean | ||
|
||
COPY docker/entry_point.sh /entry_point.sh | ||
|
||
ENTRYPOINT ["/entry_point.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Installation | ||
|
||
docker run -ti --rm --volume `pwd`:`pwd` -w `pwd` photod:latest backend-run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) 2017 Bas Stottelaar | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Photod | ||
An experimental photo gallery. | ||
|
||
## Installation | ||
|
||
Start the backend: | ||
|
||
```bash | ||
``` | ||
|
||
Start the frontend: | ||
|
||
```bash | ||
``` | ||
|
||
|
||
|
||
## Contributing | ||
Feel free to submit a pull request. All pull requests must be made against the `development` branch. | ||
|
||
Python code should follow the PEP-8 conventions and the JavaScript code should comply with the included ESLint style rules. | ||
|
||
## License | ||
See the `LICENSE.md` file (MIT license). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash -e | ||
|
||
OPTION="$1" | ||
|
||
# Check if an option is specified. | ||
if [[ -z $OPTION ]]; then | ||
echo "Usage: $0 <backend-[init|run|migrate]|frontend-[init|run|build]>" | ||
exit 0 | ||
fi | ||
|
||
# This script must be run in the project root folder. | ||
if [ ! -d "photod-backend" ]; then | ||
echo "The source directory is not mounted." | ||
exit 1 | ||
fi | ||
|
||
# Parse option and execute action. | ||
case $OPTION in | ||
backend-init) | ||
(cd photod-frontend && source env/bin/activate && pip install -r requirements.txt) | ||
;; | ||
backend-run) | ||
(cd photod-backend && source env/bin/activate && ./manage.py runserver 0:7000) | ||
;; | ||
backend-shell) | ||
(cd photod-backend && source env/bin/activate && ./manage.py shell_plus) | ||
;; | ||
backend-migrate) | ||
(cd photod-backend && source env/bin/activate && ./manage.py migrate) | ||
;; | ||
frontend-init) | ||
(cd photod-frontend && yarn) | ||
;; | ||
frontend-run) | ||
(cd photod-frontend && yarn run start) | ||
;; | ||
frontend-build) | ||
(cd photod-frontend && yarn run build-production) | ||
;; | ||
*) | ||
echo "Unknown option: $OPTION" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
# Exit successfully. | ||
exit 0 |