73 lines
1.8 KiB
YAML
73 lines
1.8 KiB
YAML
version: '3.7'
|
|
|
|
services:
|
|
|
|
# Usługa admin
|
|
admin:
|
|
build:
|
|
context: ./
|
|
dockerfile: ./admin/Dockerfile # Dockerfile znajduje się w ./admin
|
|
container_name: admin_service
|
|
volumes:
|
|
- ./app:/home/user/work # Mapowanie katalogu app do kontenera
|
|
ports:
|
|
- '3333:3333' # Mapowanie portu dla serwera HTTP
|
|
restart: always
|
|
|
|
# Usługa fapi
|
|
fapi:
|
|
build:
|
|
context: ./fapi
|
|
dockerfile: Dockerfile # Dockerfile znajduje się w ./fapi
|
|
container_name: fapi_service
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
volumes:
|
|
- ./fapi:/home/user/fapi # Mapowanie katalogu fapi do kontenera
|
|
depends_on:
|
|
- mysql-server # fapi zależy od mysql-server
|
|
ports:
|
|
- '8888:8888' # Port dla aplikacji fapi
|
|
restart: always
|
|
command: bash -c "python entrypoint.py"
|
|
|
|
# Usługa web-server (część stosu LAMP)
|
|
web-server:
|
|
build:
|
|
context: ./lamp
|
|
dockerfile: Dockerfile # Dockerfile znajduje się w ./lamp
|
|
container_name: lamp_web_server
|
|
volumes:
|
|
- ./lamp/html:/var/www/html # Mapowanie katalogu html do kontenera
|
|
ports:
|
|
- '8080:80' # Port dla serwera WWW
|
|
restart: always
|
|
|
|
# Usługa mysql-server (część stosu LAMP)
|
|
mysql-server:
|
|
image: mysql:8.0.19
|
|
container_name: lamp_mysql
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: secret
|
|
volumes:
|
|
- mysql-data:/var/lib/mysql # Wolumen dla danych MySQL
|
|
ports:
|
|
- '3306:3306' # Port dla serwera MySQL
|
|
restart: always
|
|
|
|
# Usługa phpmyadmin (część stosu LAMP)
|
|
phpmyadmin:
|
|
image: phpmyadmin/phpmyadmin:5.0.1
|
|
container_name: lamp_phpmyadmin
|
|
environment:
|
|
PMA_HOST: mysql-server
|
|
PMA_USER: root
|
|
PMA_PASSWORD: secret
|
|
ports:
|
|
- '5000:80' # Port dla phpMyAdmin
|
|
restart: always
|
|
|
|
volumes:
|
|
mysql-data:
|
|
|