-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
37 lines (35 loc) · 854 Bytes
/
Copy pathdocker-compose.yaml
File metadata and controls
37 lines (35 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
version: '3'
services:
ubike_app:
build:
context: .
dockerfile: Dockerfile
image: ubike_app
container_name: ubike_app
hostname: ubike_app
restart: always
command: bash -c "sleep 30s
&& cd /app
&& uvicorn youbike.asgi:application --host 0.0.0.0 --port 8000"
volumes:
- .:/ubike_app
ports:
- "8000:8000"
depends_on:
- youbikedatabase
youbikedatabase:
image: mysql:latest
container_name: youbikedatabase
hostname: youbikedatabase
expose:
- "3306"
ports:
- 3306:3306
volumes:
- ./youbike/exam.sql:/docker-entrypoint-initdb.d/exam.sql
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_DATABASE=exam
- MYSQL_HOST=localhost
- MYSQL_PORT=3306
- MYSQL_ROOT_HOST=%