docker compose v0.01
This commit is contained in:
parent
4264b23dac
commit
6be226a6f7
|
@ -0,0 +1,72 @@
|
|||
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:
|
||||
|
2
fapi
2
fapi
|
@ -1 +1 @@
|
|||
Subproject commit 859afea217a9027bbaf53e12c8efbff29ad71494
|
||||
Subproject commit 4e1b40521b7c3b56cd5ed95f0802c925e1d54445
|
Loading…
Reference in New Issue