2fas-server/docker-compose.yml

61 lines
1.1 KiB
YAML
Raw Normal View History

2022-12-31 10:22:38 +01:00
version: '3.8'
services:
api:
build:
context: .
dockerfile: docker/api/Dockerfile
depends_on:
2023-05-29 20:03:01 +02:00
mysql:
condition: service_healthy
2022-12-31 10:22:38 +01:00
volumes:
- ./migrations:/migrations
- go-modules:/go/pkg/mod
ports:
- "80: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
2023-05-29 20:03:01 +02:00
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
2022-12-31 10:22:38 +01:00
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: