/simple-web-docker-compose

simple-web-docker-compose

Primary LanguageTSQL

How to use

  1. clone this repository.

  2. put your app under app/html.

    cp -fpR ${your app}/data/html/* ${simple-web-docker-compose dir}/app/html
  3. start up docker containers where there is docker-compose.yml.

    • (Recommended) up without -d then you can watch progress of building up. And open another terminal to do your own work.
    • It takes 2-3 minutes.
    cd ${simple-web-docker-compose dir}/
    docker-compose up -d
  4. access https://localhost:4443 or http://localhost:8080 on your browser.

    • note: security warning appears but ignore it.

Manage the containers

  • If you finished or would like to interrupt your work today
docker-compose stop
  • If you'd like to resume your work
docker-compose start
  • If you'd like to open a shell into the each running containers
# web
docker exec -it web bash

# db
docker exec -it db bash

Structure of this project

.
├── app
│   └── src # source code
│       └── public # document root
│           ├── db_config.php
│           ├── index.php
│           └── test_db_connection
│               └── try-catch.php
├── db # db server related files
│   ├── db.env
│   └── init # init and batch sql files.
│       ├── 190512-d5f7ca8a275acaac13d290e373e418f5defd6bef.sql
│       └── **********.sql
├── docker-compose.yml
└── web # web server related files
    ├── Dockerfile
    └── web.env

Docker images