template for tubes wbd. set up docker and connecting to php and mariadb.
- docker, docker desktop would be the easiest way to get started
- docker-compose
we're going to use github and gitlab informatika as our remote git repository. We use github as a backup, and assuming that it's more reliable that gitlab informatika(and it's recommended by the assitant)
here is how to setup the repo
git clone git@github.com:christojeffrey/tubes-wbd-1.git
cd .\tubes-wbd-1\
git remote set-url origin --push --add git@gitlab.informatika.org:if3110-2022-k01-01-26/tugas-besar-1.git
git remote set-url origin --push --add git@github.com:christojeffrey/tubes-wbd-1.git
when you run
git remote -v
you should see something like this
origin git@github.com:christojeffrey/tubes-wbd-1.git (fetch)
origin git@gitlab.informatika.org:if3110-2022-k01-01-26/tugas-besar-1.git (push)
origin git@github.com:christojeffrey/tubes-wbd-1.git (push)
that means we're going to push to both gitlab and github, and we're going to fetch from github
-
go to folder where
docker-compose.yml
is located, run:docker-compose down && docker-compose build && docker-compose up
-
go to
localhost:8000
on your browser. it should serve whatever that is on./src/index.php
-
go to
localhost:7777
on your browser. you should see adminer page. login using the following credentials:server: db username: tubes password: tubes database: tubes
you should see the database that we're using for this project. the database is configured by
./sqlfile/initialschema.sql
press ctrl + c
to stop the docker compose
- Difference between CMD and ENTRYPOINT in Dockerfile
port format is host:container
todo:
- dump on close, and then load from dump
- php read data from public folder