This repository has been archived by the owner on Feb 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
138 lines (124 loc) · 3.45 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
version: '2'
services:
stb-source:
image: busybox
container_name: stb-source
volumes:
- ./../:/usr/app/src/ # code volume
- $REFARM_SRC:$DEPS_DIR
# leaved it here as example of code mounting for debugging
# - $REFARM_SRC/search:/root/.local/lib/python3.6/site-packages/search
command: sh -c "top > /dev/null"
stb-python:
build:
context: ..
dockerfile: docker/python/dev/Dockerfile
image: fidals/stb:dev
container_name: stb-python
environment:
- DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
- DATABASE_URL=postgres://$DB_USER:$DB_PASS@stb-postgres/$DB_NAME
- BROCKER_URL=amqp://$RABBITMQ_DEFAULT_USER:$RABBITMQ_DEFAULT_PASS@stb-rabbitmq:5672/
- ENV_TYPE=$ENV_TYPE
- PYTHONUNBUFFERED=0
ports:
- '$VIRTUAL_HOST_EXPOSE_PORT:$VIRTUAL_HOST_PORT'
- $VIRTUAL_HOST_LIVESERVER_PORT
depends_on:
- stb-postgres
- stb-rabbitmq
networks:
- stb-backend
- stb-frontend
volumes:
# contains refarm-site modules
- $DEPS_DIR
volumes_from:
- stb-source
# @todo #150 Validate if `.env` is full
# Is full means '.env` contains all keynames from `.env.dist`
command: python manage.py runserver 0.0.0.0:$VIRTUAL_HOST_PORT
stb-nodejs:
build:
context: ..
dockerfile: docker/node/Dockerfile
image: fidals/stb-nodejs:latest
container_name: stb-nodejs
# (gulp build && gulp watch) - it's convenient to get built static js before start watching
command: bash -c '(gulp build && gulp watch) || (npm install && npm install -g gulp-cli && gulp build)'
volumes_from:
- stb-python
- stb-source
environment:
- DEPS_DIR=$DEPS_DIR
stb-postgres:
image: postgres:9.5
restart: always
container_name: stb-postgres
environment:
POSTGRES_DB: $DB_NAME
POSTGRES_PASSWORD: $DB_PASS
networks:
- stb-backend
volumes:
- /opt/database/stroyprombeton/:/var/lib/postgresql/data
stb-rabbitmq:
image: rabbitmq:management-alpine
restart: always
container_name: stb-rabbitmq
environment:
RABBITMQ_DEFAULT_USER: $RABBITMQ_DEFAULT_USER
RABBITMQ_DEFAULT_PASS: $RABBITMQ_DEFAULT_PASS
networks:
- stb-backend
ports:
- '5674:5672'
- '15674:15672'
# TODO:
# Selenium Grid stuff (can't get it to work)
# selenium-hub:
# image: selenium/hub:3.2.0
# restart: always
# networks:
# - stb-backend
# ports:
# - '4444:4444'
# selenium-chrome:
# image: selenium/node-chrome:3.2.0
# restart: always
# depends_on:
# - selenium-hub
# environment:
# - HUB_PORT_4444_TCP_ADDR=selenium-hub
# - HUB_PORT_4444_TCP_PORT=4444
# networks:
# - stb-backend
# ports:
# - 5555
# - 5900
stb-selenium:
image: selenium/standalone-chrome:3.6.0
restart: always
ports:
- '4444:4444'
- '5900'
networks:
- stb-backend
volumes: # https://github.com/SeleniumHQ/docker-selenium#running-the-images
- /dev/shm:/dev/shm
stb-lint:
image: fidals/coala-ci
working_dir: /usr/app/src/
volumes_from:
- stb-source
- stb-python
stb-pdd:
image: fidals/pdd-ci
working_dir: /usr/app/src/
volumes_from:
- stb-source
- stb-python
command: pdd --verbose --exclude=node_modules/**/* --exclude=static/**/* --exclude=media/**/* -f report.xml
networks:
stb-backend:
stb-frontend: