Giter VIP home page Giter VIP logo

portfolio's Introduction

Portfolio

Environment variables available

These environment variables are given a default value in the up.sh and local.up.sh (host) scripts, and also in the configure.sh and entrypoint.sh (container) scripts. The default value in any of the host scripts will override the default value in the container scripts.

ENV VAR Default value Description
PROJECT_NAME Name of the project's root folder (localhost in the container scripts) Used to name the docker image and docker container from the up.sh files, and as the name server in nginx.
HOST_PORT 80 The port Docker will use as the host port in the network bridge. This is the external port, the one your app will be called through.
BASIC_AUTH_ENABLED true (false in local.up.sh) Enables Basic Authentication with Nginx.
BASIC_AUTH_USERNAME admin If BASIC_AUTH_ENABLED is true, it will be used to run htpasswd together with BASIC_AUTH_PASSWORD to encrypt with bcrypt (cost 10).
BASIC_AUTH_PASSWORD PROJECT_NAME_password If BASIC_AUTH_ENABLED is true, it will be used to run htpasswd together with BASIC_AUTH_USERNAME to encrypt with bcrypt (cost 10).

Example:

HOST_PORT=8000 BASIC_AUTH_ENABLED=true BASIC_AUTH_USER=user BASIC_AUTH_PASSWORD=secure_password ./deploy/local.up.sh

You can also run the container yourself and override the container's command to run a different process instead of the normal application and web server:

docker run --name other-container --rm -v $PWD/src:/var/www/src --rm -e PROJECT_NAME=portfolio portfolio:latest /bin/sh -c "./configure.sh && ruby -v"

Watch content

To watch the content (see the compiled changes instantly reflect after every change) run

docker exec portfolio /bin/sh -c "jekyll build --source src --destination src/public --watch"

Updating dependencies

Whenever you want to update the dependencies, delete the lock file (Gemfile.lock), run the project again (with up.sh or local.up.sh)(this will update the dependencies and write the lock file inside the container) and extract the lock files from inside the container with:

docker cp portfolio:/var/www/Gemfile.lock .

portfolio's People

Contributors

gbmcarlos avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.