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

chore: docker setups

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