Skip to content
This repository was archived by the owner on Sep 8, 2019. It is now read-only.

Commit 899bad8

Browse files
docker compose to start backend and mysql.
Stills needs to setup mysql properly and allow external access to backend
1 parent afdedc1 commit 899bad8

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

docker-compose.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: "3.1"
2+
services:
3+
api:
4+
image: webdev_api
5+
deploy:
6+
replicas: 1
7+
resources:
8+
limits:
9+
cpus: "0.1"
10+
memory: 50M
11+
restart_policy:
12+
condition: on-failure
13+
ports:
14+
- "8000:8000"
15+
environment:
16+
DATABASE_URL: mysql://root:apple1@db/web_dev
17+
18+
db:
19+
image: mysql
20+
command: --default-authentication-plugin=mysql_native_password
21+
restart: always
22+
environment:
23+
MYSQL_ROOT_PASSWORD: apple1
24+
MYSQL_DATABASE: web_dev
25+
volumes:
26+
- ./backend/migrations/2019-01-13-203149_create_users/up.sql:/docker-entrypoint-initdb.d/:ro
27+

0 commit comments

Comments
 (0)