Skip to content

Commit

Permalink
Add initial version of wordpress interview exercise
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskurzeja committed Jun 29, 2021
0 parents commit 1a4f00d
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.idea
db_data/*
!db_data/.gitkeep
wordpress_data/*
!wordpress_data/.gitkeep
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Countingup Wordpress Exercise

## Overview
Thank you for choosing to interview with Countingup for our Wordpress Developer role. We hope you find the experience
interesting and rewarding.

Our technical interview takes the form of a pairing exercise, where you will be expected to work with a member of our
team to code a solution to the problem outlined in the exercise you will be given. There will then be a some follow up
questions and an opportunity for you to ask us questions too. Whils the core problem to be solved is relatively trivial,
the exercise is designed for you to showcase your skills and to demonstrate how quickly you can learn something new.

## Prerequisites
We would ask that you have [docker compose](https://docs.docker.com/compose/install/) installed and that you choose an
appropriate IDE to implement your solution.
29 changes: 29 additions & 0 deletions apiservice/mock-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

- name: Send text for number
serveOnly: true
request:
method: POST
serveEndpoint: /api/send-text
body: { number: "+447700900123" }
response:
code: 200
headers:
content-type: application/json
serveBody:
{
messageId: "123456789",
}

- name: Send text for unknown number
serveOnly: true
request:
method: POST
serveEndpoint: /api/send-text
response:
code: 401
headers:
content-type: application/json
serveBody:
{
error: "Invalid number"
}
6 changes: 6 additions & 0 deletions custom_blocks/plugin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
/**
* Plugin Name: My Custom Blocks
* Description: Add custom blocks
* Version: 1.0.0
*/
Empty file added db_data/.gitkeep
Empty file.
38 changes: 38 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
version: "3.9"

services:
db:
image: mysql:5.7
volumes:
- ./db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress

apiservice:
image: node:16-alpine3.11
volumes:
- ./apiservice:/apiservice
command: npx ncdc serve /apiservice/mock-service.yml
ports:
- "8001:4000"

wordpress:
depends_on:
- db
- apiservice
image: wordpress:latest
volumes:
- ./wordpress_data:/var/www/html
- ./custom_blocks:/var/www/html/wp-content/plugins/custom_blocks
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
Empty file added wordpress_data/.gitkeep
Empty file.

0 comments on commit 1a4f00d

Please sign in to comment.