Compare commits

...

23 Commits

Author SHA1 Message Date
Huaoe 65147a9ac6 dev BDDD paswword 2019-09-13 14:00:00 +02:00
Huaoe a366ed749e merge Ad repo 2019-09-12 12:02:22 +02:00
Huaoe 87f6956958 isPrivate 2019-09-12 12:00:27 +02:00
Huaoe 3a78ac68f2 isPrivate in search ad 2019-09-11 16:21:11 +02:00
Sébastien 39774c1ed9 Merge branch 'master' of https://git.e-declic.net/talents-tube/website 2019-09-10 15:40:15 +02:00
Sébastien bd477b3354 Fix: ads order list 2019-09-10 15:38:13 +02:00
Sébastien 86e33a5e0a Fix: mysql-client to mariadb-client 2019-09-10 08:45:20 +02:00
Huaoe 365c71751d assetic fix 2019-09-09 17:27:40 +02:00
Huaoe 46399bd8ed typo notifications 2019-09-09 15:07:52 +02:00
Huaoe c3a8fa73cd Makefile CLIENT name 2019-09-09 14:08:36 +02:00
Huaoe fe7c9992a5 Makefile + Security spaces removal 2019-09-09 10:40:03 +02:00
Huaoe 1922ab328b uncomment video de la home 2019-09-09 09:24:53 +02:00
Huaoe a91f2df040 Update Docker SEb 2019-09-06 16:41:05 +02:00
Huaoe 1a4e81963e delete css 2019-09-04 15:47:19 +02:00
Huaoe 5ae61ff2c7 sass gen
don't know if delete would be good
2019-09-04 15:44:25 +02:00
Huaoe 995bb0b43e Merge branch 'feat/push'
# Conflicts:
#	volume/www/website/www/app/config/fos_elastica.yml
#	volume/www/website/www/src/AppBundle/Entity/User.php
#	volume/www/website/www/web/assetic/main.dash.talent.js
#	volume/www/website/www/web/css/styles.css
2019-09-04 15:42:48 +02:00
Huaoe 4c841aaafa use Authentication\Token\UsernamePasswordToken 2019-09-02 17:15:29 +02:00
Huaoe 49abf8d86f purge elastica + db user pass 2019-09-02 14:28:32 +02:00
Huaoe e3ca74f09b sass execution 2019-09-02 14:08:06 +02:00
Huaoe 6818e82c92 style sass transform stalling 2019-09-02 14:07:47 +02:00
Huaoe 2ea95f529e config fos elastica +backup 2019-09-02 11:11:55 +02:00
Huaoe 6cec286886 Merge branch 'push'
# Conflicts:
#	volume/www/website/www/app/config/fos_elastica.yml
#	volume/www/website/www/src/AppBundle/Entity/User.php
#	volume/www/website/www/vendor/bin/doctrine
#	volume/www/website/www/vendor/bin/doctrine-dbal
#	volume/www/website/www/vendor/bin/security-checker
#	volume/www/website/www/vendor/bin/simple-phpunit
#	volume/www/website/www/web/assetic/main.dash.talent.js
#	volume/www/website/www/web/css/styles.css
2019-09-02 11:11:05 +02:00
Huaoe f38d22d70d delete vendors 2019-09-02 10:37:49 +02:00
25 changed files with 400 additions and 582 deletions
+9 -4
View File
@@ -25,12 +25,12 @@ else
DC=ENV=$(ENV) CLIENT=$(CLIENT) "$(DOCKERCOMPOSE)" --project-name "$(CLIENT)_$(ENV)" --file conf/docker-compose.win.yml $(DC_OVERRIDE) $(DC_OVERRIDE_ENV)
endif
default:
$(info $(USAGE))
$(error Exiting)
docker-build:
$(DC) pull
$(DC) build
$(DC) up -d
@@ -64,8 +64,8 @@ config:
@echo " --> Generating mysql auth file"
@cat conf/env/store-mysql.env \
| python -c "import sys; import string; v=sys.stdin.readline().split('MYSQL_ROOT_PASSWORD=')[1]; print(string.Template(open('conf/build/mysql/my.cnf').read()).substitute({'PASSWORD':v}))" \
| docker exec -i $(CLIENT).store-mysql.$(ENV) sh -c 'cat > /root/.my.cnf'
| python -c "import sys; import string; v=sys.stdin.readline().split('MYSQL_ROOT_PASSWORD=')[1]; print(string.Template(open('conf/build/mysql/my.cnf').read()).substitute({'PASSWORD':v}))" \
| docker exec -i $(CLIENT).store-mysql.$(ENV) sh -c 'cat > /root/.my.cnf'
db-backup-all: db-backup-website db-backup-store
@@ -83,6 +83,11 @@ db-backup-store:
db-restore-all: db-restore-website db-restore-store
db-backup-script:
@mkdir -p backup/
@docker exec $(CLIENT).postgres.$(ENV) pg_dumpall --database database -c -U postgres > backup/postgres_$(ENV)_`date +%d-%m-%Y"_"%H_%M_%S`.sql
@docker exec $(CLIENT).store-mysql.$(ENV) mysqldump -uroot database > backup/store-mysql_$(ENV)_`date +%d-%m-%Y"_"%H_%M_%S`.sql
db-restore-website:
@echo "Restoring file to database (backup/postgres.sql)"
@cat backup/postgres.sql | docker exec -i $(CLIENT).postgres.$(ENV) psql --dbname database -U user
@@ -114,4 +119,4 @@ es-populate:
sys:
@echo $(SYS)
@echo $(DC)
@echo $(DC)
+27 -26
View File
@@ -1,53 +1,54 @@
FROM php:7.1-fpm
FROM php:7.1-fpm-buster
ENV TERM=xterm
RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list.d/debian-backports.list
#RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main\ndeb http://archive.debian.org/debian/ jessie-backports main" > /etc/apt/sources.list.d/debian-backports.list
RUN apt-get clean \
&& apt-get update \
&& apt-get install -y lsof nano less git locales
&& apt-get update \
&& apt-get install -y lsof nano less git locales
RUN echo 'fr_FR.UTF-8 UTF-8' > /etc/locale.gen \
&& /usr/sbin/locale-gen
&& /usr/sbin/locale-gen
RUN apt-get update \
&& apt-get -y install libgmp-dev \
&& ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/local/include/gmp.h \
&& docker-php-ext-install gmp \
&& docker-php-ext-configure gmp
&& ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/local/include/gmp.h \
&& docker-php-ext-install gmp \
&& docker-php-ext-configure gmp
RUN apt-get update \
&& apt-get install -y ffmpeg exiftool graphviz libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev libxslt-dev libicu-dev libxml2-dev libpq-dev libgeoip-dev libedit-dev mysql-client nodejs npm \
&& apt-get install -y --no-install-recommends libmagickwand-dev \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j4 gd mcrypt xsl zip intl gettext soap pdo_pgsql pdo_mysql mysqli pgsql json readline opcache \
&& pecl install geoip-1.1.1 redis imagick mongodb \
&& docker-php-ext-enable geoip redis imagick mongodb
&& apt-get install -y ffmpeg exiftool graphviz libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev libxslt-dev libicu-dev libxml2-dev libpq-dev libgeoip-dev libedit-dev mariadb-client nodejs npm \
&& apt-get install -y --no-install-recommends libmagickwand-dev \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j4 gd mcrypt xsl zip intl gettext soap pdo_pgsql pdo_mysql mysqli pgsql json readline opcache \
&& pecl install geoip-1.1.1 redis imagick mongodb \
&& docker-php-ext-enable geoip redis imagick mongodb
RUN { \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=60'; \
echo 'opcache.fast_shutdown=1'; \
echo 'opcache.enable_cli=1'; \
} >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=60'; \
echo 'opcache.fast_shutdown=1'; \
echo 'opcache.enable_cli=1'; \
} >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
COPY zz-logformat.conf /usr/local/etc/php-fpm.d/
COPY php.ini /usr/local/etc/php/conf.d/
RUN (curl --silent --show-error https://getcomposer.org/installer | php) \
&& mv composer.phar /usr/local/bin/composer
&& mv composer.phar /usr/local/bin/composer
RUN curl --location --silent --show-error https://symfony.com/installer -o /usr/local/bin/symfony \
&& chmod a+x /usr/local/bin/symfony
&& chmod a+x /usr/local/bin/symfony
RUN curl --location --silent --show-error https://s3.amazonaws.com/files.drush.org/drush.phar -o /usr/local/bin/drush \
&& chmod a+x /usr/local/bin/drush
&& chmod a+x /usr/local/bin/drush
RUN (npm install -g uglify-es) \
&& ln -s /usr/bin/nodejs /usr/local/bin/node
&& ln -s /usr/bin/nodejs /usr/local/bin/node
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/
&& rm -rf /var/lib/apt/lists/
+2 -2
View File
@@ -1,4 +1,4 @@
FROM php:7.1-fpm
FROM php:7.1-fpm-buster
ENV TERM=xterm
@@ -10,7 +10,7 @@ RUN echo 'fr_FR.UTF-8 UTF-8' > /etc/locale.gen \
&& /usr/sbin/locale-gen
RUN apt-get update \
&& apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev libxslt-dev libicu-dev libxml2-dev libpq-dev libgeoip-dev libedit-dev mysql-client \
&& apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev libxslt-dev libicu-dev libxml2-dev libpq-dev libgeoip-dev libedit-dev mariadb-client \
&& apt-get install -y --no-install-recommends libmagickwand-dev \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j4 gd mcrypt xsl zip intl gettext soap pdo_pgsql pdo_mysql mysqli pgsql json readline opcache \
+6
View File
@@ -14,6 +14,12 @@ Copy this before composer require : COMPOSER_MEMORY_LIMIT=-1
In php container, root@php:/home/www/website/www# php bin/console doctrine:schema:update --force
It'll update database based on entities
## For Js : use assetic commande inside server container
- do a cache-clear to update the assectic.yml file
bin/console cache:clear --env=prod --no-debug
- then
php bin/console assetic:dump --env=prod --no-debug
## To push notifications
- Create new .json file in web/push folder.
@@ -19,7 +19,7 @@
</div>
<div class="header-video-inner">
<video loop="" preload="metadata" autoplay="" id="vid" muted="muted">
{# <source src="/img/home_video.mp4" type="video/mp4"> #}
<source src="/img/home_video.mp4" type="video/mp4">
</video>
</div>
@@ -33,7 +33,7 @@
<input type="checkbox" id="notificationChecked" name="notificationChecked" {{isNotificationAllowed ? "checked=checked":""}}/>
<label for="notificationChecked">Autoriser les notificaitons</label>
<label for="notificationChecked">Autoriser les notifications</label>
</div>
</div>
@@ -5,8 +5,8 @@ assetic:
filters:
cssrewrite: ~
uglifyjs2:
bin: /usr/lib/node_modules/uglify-es/bin/uglifyjs
# bin: /usr/local/bin/uglifyjs2
#bin: /usr/lib/node_modules/uglify-es/bin/uglifyjs
bin: /usr/local/bin/uglifyjs #sym linked in container (see makefile)
assets:
vendors:
inputs:
@@ -46,6 +46,8 @@ assetic:
- 'js/vendors/datepicker.min.js'
- 'js/vendors/jquery.validate.min.js'
- 'js/talent.js'
- 'js/EdeclicTools.js'
- 'js/EdeclicPushAndNotificationClient.js'
admin:
inputs:
- 'admin/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js'
@@ -1,9 +1,7 @@
fos_elastica:
clients:
default: { host: %elastic_host%, port: %elastic_port% }
<<<<<<< HEAD
=======
indexes:
tags:
types:
@@ -143,4 +141,4 @@ fos_elastica:
model: AppBundle\Entity\User
provider: ~
finder: ~
>>>>>>> origin/master
@@ -10,7 +10,7 @@ parameters:
database_port: '5432'
database_name: database
database_user: user
database_password: edcl56
database_password: b|RN:iR<g,TNMqM6
mongodb_server: 'mongodb://tt-website.mongo.dev:27017'
prestashop_key: 9YUQ5jPqT4Z4x5s9B25pb1yuGBtpaeBDxpWDgicPF3CuP8F2p9aK18ZS
prestashop_path: /home/projects/prestashop1/store
@@ -8,8 +8,8 @@ parameters:
database_port: '5432'
database_name: database
database_user: user
#database_password: 7C|Uk2B[.>"6{QO{
database_password: b|RN:iR<g,TNMqM6
database_password: 7C|Uk2B[.>"6{QO{
#database_password: b|RN:iR<g,TNMqM6
#Mongo
mongodb_server: "mongodb://tt-website.mongo.preprod:27017"
#Prestashop
@@ -36,6 +36,6 @@ parameters:
service_mail_subject: 'mailto:looping@talentstube.com'
ttl: 300
urgency: high
topic: Emploi
topic: Emploi
push_params.public_key: BG2lV673DvB67dzEwX9GKfds3sXaEdtZo2oWO1cO2xUdTJAFZ_rV_UrP1nHQz-F8LJNO9HxG0kmQRIb54JL1ZCA
@@ -14,10 +14,10 @@ use FOS\UserBundle\Event\GetResponseUserEvent;
use FOS\UserBundle\Model\UserInterface;
use AppBundle\Entity\Company;
use AppBundle\Exception\ResourceValidationException;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
class SecurityController extends FOSRestController
{
/**
* @Rest\Post(path="/api/confirmAccount", name="api_confirm_account")
* @Rest\View
@@ -207,6 +207,7 @@ class SecurityController extends FOSRestController
// https://graph.facebook.com/debug_token?
// input_token=EAAhJAcmfVSoBAFESNEQPJFv4fOqY5G6pSUwU3BOVzmhfoP9DTu827RUelrUQHFJshZBHsHZAlZA22MvfZArsZAlJBvZBWgbuJAJQjbMcgr9dwtHZBWZCI61nsvSBbsjiA8RgonGu0zcMD8GZCJDoZA26fZAgmURRgJUprfZCOvEzZBFgfUo1UjIHhiqey&access_token=2332071840142634|afb8bbca72bd8c517c64f81e998e4f12
//TODO: à mettre en config
$req = 'https://graph.facebook.com/debug_token?input_token=' . ($token) . '&access_token=1800752833559014|454de729b1e58f506f94c8b50ca5c011';//PROD PREPROD
//'&access_token=2332071840142634|afb8bbca72bd8c517c64f81e998e4f12'; //DEV
@@ -60,7 +60,7 @@ class Company
*
* @ORM\Column(name="brand_name", type="string", length=255, options={"comment":"Nom commercial"}, nullable=true)
*
* @Groups({"ad_detail", "company_list", "company_detail", "answer_list", "answer_detail"})
* @Groups({"ad_detail", "ad_list", "company_list", "company_detail","answer_detail","answer_list"})
*/
private $brandName;
@@ -6,16 +6,15 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use FOS\UserBundle\Model\User as BaseUser;
use Symfony\Component\HttpFoundation\File\UploadedFile;
<<<<<<< HEAD
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Expose;
use Hateoas\Configuration\Annotation as Hateoas;
use JMS\Serializer\Annotation\Groups;
use JMS\Serializer\Annotation\Type;
=======
use AppBundle\Utils\Traits\CareerJsonTrait;
>>>>>>> origin/master
/**
* @ORM\Entity(repositoryClass="AppBundle\Repository\UserRepository")
* @ORM\Table(name="fos_user")
@@ -23,8 +23,9 @@ class AdRepository extends AbstractRepository
->createQueryBuilder('a')
->select('a')
->where('a.isVisible = true')
->orderBy('a.title', $order);
->andWhere('a.isPrivate = false')
->orderBy('a.title', $order)
->orderBy('a.publishedAt', 'desc');
$qb
->andWhere('a.isPromoted = ?3')
@@ -77,21 +77,10 @@ class CompanyRepository extends AbstractRepository
public function search($term, $order = 'asc', $limit = 10, $offset = 1,
$isEmphasis)
{
// $qb = $this
// ->createQueryBuilder('c')
// ->select('c')
// ->leftJoin('c.ads', 'a', 'WITH', 'a.status =:status')
// ->setParameter(':status', "PUBLISHED")
// ->where("c.type = 'COMPANY'")
// ->orWhere('c.presentationVideo IS NOT NULL')
// ->orderBy('a.publishedAt', 'DESC')
// ->orderBy('c.cTime', 'DESC');
$qb = $this->createQueryBuilder('c')
->select('c')
->where("c.type = 'COMPANY'")
->andWhere("c.isPrivate = false")
->leftJoin('c.ads', 'a', 'WITH', 'a.status =:status')
->setParameter(':status', "PUBLISHED")
->orderBy('a.publishedAt', 'DESC')
@@ -0,0 +1 @@
../doctrine/dbal/bin/doctrine-dbal
@@ -1,5 +1,5 @@
XSym
0028
6ad9c04ba34037260849b181387a137a
../doctrine/orm/bin/doctrine
0034
9c0044dbf9d81c454fd8aeca68e706da
../doctrine/dbal/bin/doctrine-dbal
-5
View File
@@ -1,5 +0,0 @@
XSym
0044
2a11eaeab3acf944b97bb7a15e6c72bf
../symfony/phpunit-bridge/bin/simple-phpunit
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -121,7 +121,7 @@
.fix-search{
position: fixed;
top: 89px;
top: 60px;
width: 100%;
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;