---
# System prepended metadata

title: Full Stack Training Assignment

---

# Full Stack Training Assignment
## Docker
📅 Due Date: 3 Dec, 2021

1. Prepare database
    a. Run a MySQL container with 5.6 version
    b. Connect it with your own way(eg. Navicat, MySQL Workbench, Terminal)
    c. Execute the prepared init-sql script
    
2. Write a simple service to read/write database( any programming language is fine )

3. Write a `Dockerfile` to build an image to run your service
    * base os: centOS 7
    * set environment timezone: `Asia/Shanghai`

4. Start your service and MySQL with **two** seperated `docker-compose.yml`
    1. Your service ( image built in step 3 )
        * use `volumes` way to put your service in the container
        * the conatiner should be always on

    2. MySQL
        * MySQL version: 5.6
        * use `volumes` way to mount db data from container to host
        * use `volumes` way to init database
        * set environment timezone: `Asia/Shanghai`

    3. Make sure your service connect to MySQL and work well

> Note:
> Feel free to ask me if you have any confusion.