Commit a4e9f1cc authored by Simonas's avatar Simonas

server update

parent 91423d2e
......@@ -17,7 +17,7 @@
### DB backup
- `C:\web\dev.biuro> docker exec -i dev-biuro-mysql mysqldump -udev_user -pY6V6bFkD6@GyD!wTShgFmWz! --default-character-set=utf8 dev_biuro > docker/mariadb/data-004.sql`
- `sudo docker exec -i biuro-staging-mysql mysqldump -ustaging_user -p'qzl8pMNV^gZ&c1!7ebVsXqQh' --default-character-set=utf8 staging_biuro > docker/mariadb/data-004.sql`
- `sudo docker exec -i biuro-staging-mysql mysqldump -ustaging_user -p'qzl8pMNV^gZ&c1!7ebVsXqQh' --default-character-set=utf8 staging_biuro > docker/mariadb/data-005.sql`
### DB restore
- `C:\web\dev.biuro> docker exec -i dev-biuro-mysql mysql -udev_user -pY6V6bFkD6@GyD!wTShgFmWz! --default-character-set=utf8 dev_biuro < docker/mariadb/data-004.sql`
......@@ -88,24 +88,13 @@ Restart docker (sometimes PC restart may be required)
- docker restart dev-biuro-nginx
- docker restart dev-biuro-wordpress
- docker push simoncereska/ourdemo
- docker pull simoncereska/ourdemo:0.0.0
- sudo docker login --username=simoncereska --password=rlgjsPeOuF2T6VgW8fGss81h
- sudo docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs
- sudo docker-compose up -d
- sudo docker restart staging-biuro-nginx
- curl docker
- docker run -d -p 80:80 release:0.0.0
- docker run -d -p 80:80 -p 443:443 release:0.0.0
- docker run -d -p 80:80 simoncereska/ourdemo:0.0.1
- docker run -it simoncereska/ourdemo
- docker build -t release:0.0.0 .
- docker images
- docker rmi 568c4670fa80
......@@ -114,9 +103,10 @@ Restart docker (sometimes PC restart may be required)
- docker load --input ourdemo.tar
- docker build -t simoncereska/biuro-staging:0.0.9 .
- docker login --username=simoncereska --password=rlgjsPeOuF2T6VgW8fGss81h
- docker push simoncereska/biuro-staging:0.0.9
- docker build -t biuro/web:0.0.1 .
- docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs
- docker push biuro/web:0.0.1
- docker pull biuro/web:0.0.0
- sudo chown -R www-data:www-data wordpress/wp-content/plugins
......
......@@ -74,13 +74,6 @@ services:
- ./nginx/redirects:/etc/nginx/redirects
- ./nginx/cache:/var/cache/nginx
# - ./nginx/nginx.conf:/etc/nginx/nginx.conf
# - ./nginx:/etc/nginx/conf.d
# - ./nginx/conf.d:/etc/nginx/conf.d
# - ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./logs/nginx:/var/log/nginx
- ./certs:/etc/letsencrypt
- ./certs-data:/data/letsencrypt
......
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Biuro
* @since 1.0
* @version 1.0
*/
get_header(); ?>
<?php
while ( have_posts() ) :
the_post();
the_content();
endwhile;
?>
<?php get_footer();
<?php
/**
*
get_header(); ?>
<?php
global $query_string;
$query_args = explode("&", $query_string);
debug( $query_args );
$search_query = array();
foreach($query_args as $key => $string) {
$query_split = explode("=", $string);
$search_query[$query_split[0]] = urldecode($query_split[1]);
} // foreach
debug( $search_query );
$the_query = new WP_Query($search_query);
// $query = new WP_Query( array( 'author_name' => 'carlo' ) );
// $args = array(
// 'post_type' => 'accommodation',
// 'meta_query' => array(
// array( 'key' => 'city', 'value' => 'Paris', 'compare' => 'LIKE' ),
// array( 'key' => 'type', 'value' => 'room', 'compare' => 'LIKE' ),
// 'relation' => 'AND'
// )
// );
// $the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) :
?>
<!-- the loop -->
<h1>Lorem ipsum - Search</h1>
<ul>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</li>
<?php endwhile; ?>
</ul>
<!-- end of the loop -->
<?php wp_reset_postdata(); ?>
<?php else : ?>
<h1>Lorem ipsum - Search</h1>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
<?php get_footer();
*/
?>
<?php
/**
* Template Name: Search & Jobs page
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment