Langsung aja dah, ini example dari docker-compose.yml file..
version: '3'
services:
simrs-api:
container_name: simrs-api
image: php:8.3-apache
restart: unless-stopped
links:
- "database-api:database-api"
ports:
- 8080:80
volumes:
- [YOUR_APP_LOCATION]:/var/www/html
networks:
web_proxy:
ipv4_address: 10.10.50.4
database-api:
container_name: database-api
image: mariadb:lts
restart: unless-stopped
environment:
MARIADB_ROOT_PASSWORD: secret123
ports:
- 3306:3306
volumes:
- [YOUR_DATABASE_LOCATION]:/var/lib/mysql
networks:
web_proxy:
ipv4_address: 10.10.50.5
networks:
web_proxy:
ipam:
driver: default
config:
- subnet: 10.10.50.0/24
#IF USE EXTERNAL CONFIG
# external: true
Penjelasannya menyusul deh.. lagi mager.. wkwkwkwk..
No comments:
Post a Comment