-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
36 lines (36 loc) · 1.16 KB
/
docker-compose.yml
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
# Version is dependent to Docker version
# YML file is indent dependent
version: "3"
# Services to run
services:
fishingsite:
#image: fishingsite
# This service will be build from file
build:
context: .
dockerfile: web.Dockerfile
## Add custom commad to run instead of the command from Dockerfile
command: vapor run --hostname=fishingsite --port=9000
# Just a workaround, DB is slow to start
restart: unless-stopped
# HOSTPORT:CONTAINERPORT
ports:
- "8080:9000"
# This means that mysql container needs to be started before fishingsite
depends_on:
- "db"
environment:
DB_HOSTNAME: "db"
DB_USER: "vapor"
DB_PASSWORD: "verynicefishing"
DB_DATABASE: "fishing_database"
db:
image: mysql:5.7
# Open port to localhost if you need to access with sql app
ports:
- 3306:3306
environment:
MYSQL_USER: "vapor"
MYSQL_PASSWORD: "verynicefishing"
MYSQL_ROOT_PASSWORD: "default"
MYSQL_DATABASE: "fishing_database"