-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (46 loc) · 1.04 KB
/
docker-compose.yml
File metadata and controls
47 lines (46 loc) · 1.04 KB
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
38
39
40
41
42
43
44
45
46
47
version: '3.3'
services:
db:
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: 'lrnipdb'
# So you don't have to use root, but you can if you like
MYSQL_USER: 'user'
# You can use whatever password you like
MYSQL_PASSWORD: 'password'
# Password for root access
MYSQL_ROOT_PASSWORD: 'password'
ports:
# <Port exposed> : < MySQL Port running inside container>
- '3307:3306'
expose:
# Opens port 3306 on the container
- '3307'
networks:
- backend
# Where our data will be persisted
volumes:
- my-db:/var/lib/mysql
# Names our volume
backend-node:
build:
context: .
image: backend-app
networks:
- backend
env_file: .env
# environment:
# - MYSQL_HOST=mysql-app2
# - MYSQL_USER=moeuser
# - MYSQL_PASS=moepass
# - MYSQL_DB=moe_db
# volumes:
# - ./www/:/usr/src/app2/uploads
ports:
- "3001:3001"
container_name: backend-app
volumes:
my-db:
networks:
backend: