Code Monkey home page Code Monkey logo

chlovet2's Introduction

This is a personal website

There's not much for you here. You might find some code samples in here but nothing I'm really proud of.

Install

Start by coying sample *.env files:

cp docker.env.dist docker.env
cp env.dist .env

Then edit them, start by generated new passwords and change them all.

Then link the targeted environement docker-composer configuration.

For development environment:

ln -s docker-compose-dev.yaml docker-compose.yaml

Or for production environement:

ln -s docker-compose-prod.yaml docker-compose.yaml

Now you may run docker-compose to build containers:

./docker-rebuild.sh

Once done, if everything went fine, connect to postgres container to set up the database user:

docker exec -ti chlovet-postgres /bin/bash
su - postgres
createuser chlovet --createdb --login
createdb chlovet --owner='Here set the .env file database user'
psql -c "ALTER USER chlovet WITH PASSWORD 'Here set the .env file database password';"

Download composer.phar in the app/ folder. Ensure this is a legitimate copy by checking the file using its checksum.

Exit the container, and now let's finally prepare PHP:

docker exec -ti chlovet-php-fpm /bin/bash

Then for development environment:

php ./composer.phar install

Or for production environement:

php ./composer.phar install --no-dev --prefer-dist -o

And we will finish by creating the schema and clear the cache, you still need to be in the PHP container:

bin/console c:c
bin/console doctrine:migrations:migrate

Now you're almost done, we have a permission problem with nginx, so you need to run this from inside the app/ folder, but outside of docker:

cd app/
bin/user_rights -o -u root -g www-data -w public/

Now everything should work, if not, stop the containers and restart them this way:

docker stop chlovet-nginx chlovet-postgres chlovet-php-fpm
./docker-up.sh

chlovet2's People

Contributors

pounard avatar

Watchers

 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.