Leonid Nikitin
9bfd3fef1a
Added Swagger as a new service in the docker-compose file for generating the API documentation. The new API documentation is provided via an OpenAPI file located at `public/swagger.json`. Changes in routing were done to handle /api-docs requests and redirect them to the running Swagger UI instance. This will make API easier to understand and debug.
57 lines
1.7 KiB
YAML
57 lines
1.7 KiB
YAML
version: '3'
|
|
services:
|
|
web:
|
|
image: docker.angie.software/angie
|
|
volumes:
|
|
- ./docker/dev/angie/config/default.conf:/etc/angie/http.d/default.conf
|
|
- ./:/var/www/html
|
|
ports:
|
|
- ${DOCKER_ANGIE_PORT}:80
|
|
#restart: always
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
- app
|
|
app:
|
|
image: service-captcha-laravel
|
|
container_name: service-captcha-laravel-www
|
|
build: ./docker/dev/php
|
|
#restart: always
|
|
user: 1000:1000
|
|
volumes:
|
|
- ./docker/dev/php/config/php.ini:/usr/local/etc/php/conf.d/php.ini
|
|
- ./docker/dev/php/config/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
|
|
- ./:/var/www/html
|
|
expose:
|
|
- "9000"
|
|
redis:
|
|
image: redis:3.0-alpine
|
|
db:
|
|
image: mysql:8.0.33
|
|
command: --default-authentication-plugin=mysql_native_password
|
|
#restart: always
|
|
ports:
|
|
- ${DOCKER_DB_PORT}:3306
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
|
MYSQL_DATABASE: ${DB_DATABASE}
|
|
MYSQL_USER: ${DB_USERNAME}
|
|
MYSQL_PASSWORD: ${DB_PASSWORD}
|
|
volumes:
|
|
- ./docker/dev/db:/var/lib/mysql
|
|
- ./docker/dev/my.cnf:/etc/mysql/conf.d/my.cnf
|
|
swagger:
|
|
image: swaggerapi/swagger-ui
|
|
environment:
|
|
URLS: "[ { url: '/swagger.json', name: '/swagger.json' } ]"
|
|
BASE_URL: /api-docs
|
|
ports:
|
|
- "8080"
|
|
# volumes:
|
|
# - ./docker/swagger:/swagger
|
|
adminer:
|
|
image: adminer
|
|
#restart: always
|
|
ports:
|
|
- ${DOCKER_ADMINER_PORT}:8080
|