April 26, 2024, 3:10 p.m. | Hòa Nguyễn Coder

DEV Community dev.to



docker-compose.yml



version: '3.8'

services:
# service1:
service1:
build:
context: ./service1
dockerfile: Dockerfile.php7
volumes:
- ./service1:/var/www/html/service1
networks:
- networks_app_service1
- web

mysql_service1:
image: mysql:8.0
container_name: mysql_service1
restart: unless-stopped
environment:
MYSQL_DATABASE: db_service1
MYSQL_ROOT_PASSWORD: 12345678
MYSQL_PASSWORD: 12345678
MYSQL_USER: hoacode_service1
SERVICE_TAGS: dev
SERVICE_NAME: mysql
ports:
- '3306:3306'
volumes:
- ./service1/mysql:/docker-entrypoint-initdb.d
networks:
- networks_app_service1

nginx_service1:
build:
context: ./service1/nginx
dockerfile: Dockerfile
volumes:
- ./service1/nginx:/etc/nginx/conf.d/
- ./service1:/var/www/html/service1
ports:
- "8000:80"
networks:
- networks_app_service1
- web

# service2:
service2:
build:
context: ./service2
dockerfile: Dockerfile
volumes:
- ./service2:/var/www/html/service2
networks: …

build context dev devops docker docker-compose environment html image laravel microservices multiple mysql networks nginx programming services web webdev

Lead Developer (AI)

@ Cere Network | San Francisco, US

Research Engineer

@ Allora Labs | Remote

Ecosystem Manager

@ Allora Labs | Remote

Founding AI Engineer, Agents

@ Occam AI | New York

AI Engineer Intern, Agents

@ Occam AI | US

AI Research Scientist

@ Vara | Berlin, Germany and Remote