2fas-server/docker-compose.yml
Krzysztof Dryś 2e4f34e829
feat: create admin api (#5)
* feat: create admin api

Create admin api as a standalone application.
2023-09-22 15:19:04 +02:00

74 lines
1.3 KiB
YAML

version: '3.8'
services:
api:
build:
context: .
dockerfile: docker/api/Dockerfile
depends_on:
mysql:
condition: service_healthy
volumes:
- ./migrations:/migrations
- go-modules:/go/pkg/mod
ports:
- "80:8080"
env_file:
- .env
admin:
build:
context: .
dockerfile: docker/admin/Dockerfile
depends_on:
mysql:
condition: service_healthy
ports:
- "8082:8080"
env_file:
- .env
websocket:
build:
context: .
dockerfile: docker/websocket/Dockerfile
depends_on:
- mysql
ports:
- "8081:8081"
env_file:
- .env
mysql:
image: mysql:8
volumes:
- ./data/mysql:/var/lib/mysql
- ./docker/mysql/dev-schema.sql:/docker-entrypoint-initdb.d/schema.sql
ports:
- "127.0.0.1:3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=root
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
redis:
image: bitnami/redis:latest
ports:
- "127.0.0.1:6379:6379"
environment:
- ALLOW_EMPTY_PASSWORD=yes
swaggerui:
build:
context: .
dockerfile: docker/swaggerui/Dockerfile
ports:
- "8080:8080"
volumes:
- ./api/openapi:/usr/share/nginx/html/doc
volumes:
go-modules: