You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
878 B
29 lines
878 B
1 year ago
|
version: '2'
|
||
|
services:
|
||
|
php:
|
||
|
image: yiisoftware/yii2-php:8.1-apache
|
||
|
volumes:
|
||
|
- ~/.composer-docker/cache:/root/.composer/cache:delegated
|
||
|
- ./:/app:delegated
|
||
|
ports:
|
||
|
- '8001:80'
|
||
|
depends_on:
|
||
|
- api-postgres
|
||
|
|
||
|
api-postgres:
|
||
|
image: postgres:14.8-alpine
|
||
|
environment:
|
||
|
POSTGRES_USER: app
|
||
|
POSTGRES_PASSWORD: secret
|
||
|
POSTGRES_DB: app
|
||
|
PGDATA: "/var/lib/postgresql/data/pgdata"
|
||
|
volumes:
|
||
|
- .:/var/lib/postgresql/data
|
||
|
# - db-postgres:/var/lib/postgresql/data
|
||
|
# net stop winnat // перезапуск службы, если бд не запускается (Windows)
|
||
|
# docker-compose run --rm php composer install // обновление композера, установка расширений, работа с консолью
|
||
|
ports:
|
||
|
- "54333:5432"
|
||
|
|
||
|
volumes:
|
||
|
db-postgres:
|