add extra docker-compose files

3 containers //lamp
        4 containers //lamp + fapi all pluged to the same bridge
        1 container "fapi", without connection to bridge
        1 container "fapi" with connection to external bridge
This commit is contained in:
mpabi 2024-06-23 12:27:42 +00:00
parent cadea84243
commit 9546be7888
3 changed files with 77 additions and 3 deletions

View File

@ -1,6 +1,42 @@
version: '3.8' version: '3.7'
services: services:
web-server:
build:
dockerfile: php/Dockerfile
context: .
restart: always
volumes:
- "./html/:/var/www/html/"
ports:
- "8080:80"
networks:
- my-network
mysql-server:
image: mysql:8.0.19
restart: always
environment:
MYSQL_ROOT_PASSWORD: secret
volumes:
- mysql-data:/var/lib/mysql
ports:
- "3306:3306"
networks:
- my-network
phpmyadmin:
image: phpmyadmin/phpmyadmin:5.0.1
restart: always
environment:
PMA_HOST: mysql-server
PMA_USER: root
PMA_PASSWORD: secret
ports:
- "5000:80"
networks:
- my-network
fapi: fapi:
build: . build: .
container_name: fapi container_name: fapi
@ -8,5 +44,13 @@ services:
- "9999:9999" - "9999:9999"
volumes: volumes:
- ./data:/app/data - ./data:/app/data
command: ["python", "entrypoint.py"] command: ["tail", "-f", "/dev/null"]
networks:
- my-network
volumes:
mysql-data:
networks:
my-network:

12
src/docker-compose3.yaml Normal file
View File

@ -0,0 +1,12 @@
version: '3.8'
services:
fapi:
build: .
container_name: fapi
ports:
- "9999:9999"
volumes:
- ./data:/app/data
command: ["tail", "-f", "/dev/null"]

18
src/docker-compose4.yaml Normal file
View File

@ -0,0 +1,18 @@
version: '3.7'
services:
fapi:
build: .
container_name: fapi
ports:
- "9999:9999"
volumes:
- ./data:/app/data
command: ["tail", "-f", "/dev/null"]
networks:
- my-network
networks:
my-network:
external: true