-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
76 lines (72 loc) · 1.42 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
version: '2'
services:
lb:
image: dockercloud/haproxy:1.2
ports:
# HOST:CONTAINER
- '80:80'
links:
- web
volumes:
# HOST:CONTAINER
- /var/run/docker.sock:/var/run/docker.sock
environment:
BALANCE: roundrobin
VIRTUAL_HOST: dockermeetup.dev
web:
restart: always
dns:
- 8.8.8.8
build:
context: ./web
dockerfile: Dockerfile
env_file: web/.env
# environment:
# DATABASE_USER: root
# DATABASE_PASS: password
# DATABASE_HOST: db
# DATABASE_NAME: dev-db
# GIN_MODE: debug
# HTTP_PORT: 8080
expose:
- "8080"
links:
# depends_on:
- database:db
api:
restart: always
dns:
- 8.8.8.8
build:
context: ./api
dockerfile: Dockerfile
environment:
DB_HOST: db
command: puma -C config/puma.rb
volumes:
- ./api:/app
expose:
- "3000"
ports:
- '3000:3000'
links:
- database:db
database:
image: mysql
environment:
MYSQL_DATABASE: "dev-db"
MYSQL_ROOT_PASSWORD: "password"
ports:
- "3306:3306"
# networks:
# app_net:
# driver: bridge
# driver_opts:
# com.docker.network.enable_ipv6: "true"
# ipam:
# driver: default
# config:
# - subnet: 172.16.238.0/24
# gateway: 172.16.238.1
# - subnet: 2001:3984:3989::/64
# gateway: 2001:3984:3989::1