Skip to content

Le site principal et sa boutique

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE.md
Unknown
license.txt
Notifications You must be signed in to change notification settings

coworking-metz/Portail-Coworking-Metz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Portail web du coworking (wordpress / woocommerce)

This project holds the Coworking Metz website source code, available at https://www.coworking-metz.fr.

Getting Started

These instructions will give you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Requirements for the software and other tools to build, test and push

  • Git - Version control system
  • Docker - Container platform

Data

Dump sql local: https://drive.google.com/open?id=1LTns7m4cnJQcL8B-l3r4GsmTNdhtUB-C&usp=drive_fs

Install

Code

A step by step series of examples that tell you how to get a development environment running:

git clone git@gitlab.com:coworking-metz-poulailler/portail-coworking-metz.git
cd portail-coworking-metz
  • Edit /etc/hosts to redirect www.coworking-metz.local to 127.0.0.1
  • Run docker-compose up

SQL Import

WIth phpmyadmi
With external software
  • connect to local mysql server. Refer to the docker-compose.yml to know the user and password to use (default is root/password)
  • Import the SQL file in the wordpress database
Users
Building JavaScript

Build scripts.js using wp-content/themes/ave-child/build.sh script. If run with --watch, the script will watch for changes and then write update the js file

Local URL
Logging in

Houra 🎉 You have successfully setup the project 🙌

Start the project

Make sure Docker is running before starting.

docker-compose up --build -d

Ou

docker-compose up --build

Pour voir la sortie de la log DOcker dans le terminal

WP-Cli

You can manage the website using wp cli :

docker-compose exec --user www-data wordpress wp [command]

Then the website will be available at http://www.coworking-metz.local/.

OAuth2

DISCLAIMER This server use a plugin called oauth2-provider to serve as OAuth2 provider. As the plugin is somewhat non free and requires a license to be fully functionnal, you have 2 options to bypass restrictions on grant_types:

  • comment the following code in TokenController.php#190 to let any client ask for a new refresh token.
/**
 * Validate the client can use the requested grant type
 */
// if ( ! $this->clientStorage->checkRestrictedGrantType( $clientId, $grantTypeIdentifier ) ) {
// 	$response->setError( 400, 'unauthorized_client', 'The grant type is unauthorized for this client_id' );
// 	return false;
// }
  • or edit the client details directly in the database
UPDATE `wp_postmeta`
SET `meta_value` = 'a:3:{i:0;s:18:\"authorization_code\";i:1;s:8:\"implicit\";i:2;s:13:\"refresh_token\";}'
WHERE `wp_postmeta`.`meta_id` = 386442;

Update: This manual modification is no longer necessary, it is done by the code in mu-plugins/oauth2-provider.php

Troubleshoot

If you are experiencing slowliness from loading files in Docker on macOS, you can set the VirtioFS in the General settings of Docker.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments