Skip to content

Commit f61d4b8

Browse files
committed
create .docker-compose.yml
1 parent 13d188c commit f61d4b8

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

docker-compose.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
services:
2+
app:
3+
stdin_open: true
4+
tty: true
5+
image: container-sejdm4y
6+
build:
7+
context: ./src
8+
ports:
9+
- "5000:5000"
10+
volumes:
11+
- type: bind
12+
source: ./src/web
13+
target: /usr/src/app
14+
environment:
15+
ALLOWED_HOSTS: "127.0.0.1,localhost"
16+
DATABASE_URL: mysql2=//app_user=password@db=3306/app_database?pool=5&useUnicode=true&characterEncoding=UTF-8
17+
DB_ENGINE: django.db.backends.mysql
18+
DB_HOST: db
19+
DB_NAME: app_database
20+
DB_PASSWORD: password
21+
DB_PORT: 3306
22+
DB_USER: app_user
23+
DEBUG: True
24+
SECRET_KEY: local_development
25+
26+
27+
db:
28+
# This database service is used only for local development
29+
# Note: It may be preferable to use an online database service
30+
# https://db.anotherwebservice.com/
31+
image: mysql
32+
restart: always
33+
environment:
34+
MYSQL_ROOT_PASSWORD: password
35+
MYSQL_USER: app_user
36+
MYSQL_PASSWORD: password
37+
MYSQL_DATABASE: app_database
38+
39+
phpmyadmin:
40+
# To view the database during local development
41+
# Visit http://127.0.0.1:8080/
42+
# Server is: db
43+
# Username is same as MYSQL_USER
44+
# Password is same as MYSQL_PASSWORD
45+
image: phpmyadmin
46+
restart: always
47+
ports:
48+
- 8080:80
49+
environment:
50+
PMA_ARBITRARY: "1"

0 commit comments

Comments
 (0)