diff --git a/server/.gitignore b/server/.gitignore new file mode 100644 index 0000000..442f172 --- /dev/null +++ b/server/.gitignore @@ -0,0 +1,4 @@ +galleries +plugins +responsiv-flat +logs diff --git a/server/Dockerfile b/server/Dockerfile new file mode 100644 index 0000000..83ede7b --- /dev/null +++ b/server/Dockerfile @@ -0,0 +1,3 @@ +FROM aspendigital/octobercms:latest +RUN usermod -u 1000 www-data +RUN usermod -G staff www-data diff --git a/server/README.md b/server/README.md new file mode 100644 index 0000000..43180bc --- /dev/null +++ b/server/README.md @@ -0,0 +1,18 @@ +## Notes +**DO NOT** forget to create the directories before running docker-compose the +first time otherwise they'll be created with `root` permissions and cause +everything to go to shit. + +## For a persistemt database + +```bash +# create empty database file on host +mkdir storage +touch storage/database.sqlite + +# start container +docker-compose up -d + +# provision database +docker-compose exec web php artisan october:up +``` diff --git a/server/docker-compose.yml b/server/docker-compose.yml new file mode 100644 index 0000000..87af341 --- /dev/null +++ b/server/docker-compose.yml @@ -0,0 +1,35 @@ +# Reference - https://docs.docker.com/compose/compose-file/ +version: '2.2' +services: + web: + # image: aspendigital/octobercms:latest + build: . + image: octobercms + restart: always + ports: + - 127.0.0.1:8101:80 + environment: + - ENABLE_CRON=true + - APP_DEBUG=true + # - CMS_ACTIVE_THEME=starter + # - CMS_BACKEND_SKIN=AspenDigital\Backend\Skins\Admin + - INIT_PLUGINS=true + # - TZ=${TZ:-America/Denver} + volumes: + # A local `.env` is not required but expected if you wish to pass secrets + # to the config - see README.md + # - ./.env:/var/www/html/.env + + - ./plugins:/var/www/html/plugins + - ./storage/app:/var/www/html/storage/app + - ./storage/logs:/var/www/html/storage/logs + + # need to create database.sqlite on filesystem before running for the + # first time - touch storage/database.sqlite + # and also poulate it - see README.md + - ./storage/database.sqlite:/var/www/html/storage/database.sqlite + + # Mounting the entire `themes` folder can cause performance issues in + # Docker for Mac + # https://docs.docker.com/compose/compose-file/#caching-options-for-volume-mounts-docker-for-mac + - ./themes:/var/www/html/themes diff --git a/server/package.json b/server/package.json new file mode 100644 index 0000000..18a1e41 --- /dev/null +++ b/server/package.json @@ -0,0 +1,3 @@ +{ + "dependencies": {} +} diff --git a/server/storage/database.sqlite b/server/storage/database.sqlite new file mode 100644 index 0000000..8b81227 Binary files /dev/null and b/server/storage/database.sqlite differ diff --git a/server/themes/marc-leopold-api/pages/about.htm b/server/themes/marc-leopold-api/pages/about.htm new file mode 100644 index 0000000..07cc949 --- /dev/null +++ b/server/themes/marc-leopold-api/pages/about.htm @@ -0,0 +1,12 @@ +title = "About" +url = "/api/v1/about" +is_hidden = 0 +contentType = "json" +force_show = 0 +== +{ + "success": true, + "title": "About Me", + "imageUrl": "", + "body": "
\r\n

\"As a photographic artist, my creative pursuit is to escape the attempts to categorize, characterize, compartmentalize, explain, or limit my photographic expression. It is always pleasing to see how observers respond with delight to the ultimate visualizations of my quest. My fondest wish is to pursue my life as a photographer, unbridled and always with a resolve to improve and be the best I can, with a constant yearning to be better.\"<\/p>\r\n <\/blockquote>\r\n