-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
53 lines (51 loc) · 1.21 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Usefull links
# =============
# https://hub.docker.com/_/php/
# https://docs.docker.com/compose/overview/
# https://docs.docker.com/compose/compose-file/
#
# Usefull commands
# ================
#
# Start containers
# $ docker-compose up -d
#
# View running containers
# $ docker-compose ps
#
# Connect into command line of running container
# $ docker-compose run <container_name> bash
# where <name> could be db_limoncello_app, etc.
# Tip: `Ctrl+p` + `Ctrl+q` + `Enter` (to exit container bash)
#
# Stop containers
# $ docker-compose down
#
# Remove images
# $ docker rmi db_limoncello_app
#
# Run non-default docker-compose file
# $ docker-compose -f <file_name.yml> up -d
# $ docker-compose -f <file_name.yml> down
# $ docker-compose -f <file_name.yml> stop
version: '3'
services:
db:
image: percona
container_name: db_limoncello_app
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: passport
MYSQL_PASSWORD: secret
MYSQL_DATABASE: limoncello_app
# db:
# image: postgres
# container_name: db_limoncello_app
# ports:
# - "5432:5432"
# environment:
# POSTGRES_USER: root
# POSTGRES_PASSWORD: secret
# POSTGRES_DB: limoncello_app