Skip to content
Snippets Groups Projects
Commit ad737b49 authored by Ahmad Nadil's avatar Ahmad Nadil
Browse files

chore: docker setups

parent 380344ed
No related merge requests found
DB_HOST=
DB_USER=
DB_PASSWORD=
DB_NAME=
# FOR DOCKER
# DB_HOST=db
# DB_USER=php_docker
# DB_PASSWORD=password
# DB_NAME=php_docker
# SOAP_KEY=shortT_Key
# WSDL=http://soap-service:8080/ws/
\ No newline at end of file
DB_HOST=web-db
DB_USER=scholee
DB_PASSWORD=password
DB_NAME=scholee
SOAP_KEY=shortT_Key
WSDL=http://soap-service:8080/ws/
\ No newline at end of file
version: '3.3'
services:
db:
image: mysql:latest
web-db:
image: mysql:8.0
environment:
- MYSQL_DATABASE=scholee
- MYSQL_USER=scholee
- MYSQL_PASSWORD=password # this should live in a env var
- MYSQL_ALLOW_EMPTY_PASSWORD=1 # equivalent to True
- MYSQL_PASSWORD=password
- MYSQL_ALLOW_EMPTY_PASSWORD=1
volumes:
- "./db:/docker-entrypoint-initdb.d" # this is how we persist a sql db even when container stops
php-apache:
- "./db:/docker-entrypoint-initdb.d"
web-service:
build:
context: .
dockerfile: Dockerfile
image: php:8.0-apache
volumes:
- ".:/var/www/html" # sync the current dir on local machine to the dir of container
- ".:/var/www/html"
ports:
- 3000:80 # for future http traffic
- 443:443 # for future ssl traffic
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- 8001:80
environment:
- PMA_HOST=db
- PMA_PORT=3306
\ No newline at end of file
- 3000:80
depends_on:
- web-db
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