forked from kayaelle/badgr-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
62 lines (56 loc) · 1.3 KB
/
docker-compose.prod.yml
File metadata and controls
62 lines (56 loc) · 1.3 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# A dockerized badgr-server stack to emulate a production build
version: '3.3'
services:
# this container copies in the project code and runs the app with uwsgi
api:
build:
context: .
dockerfile: .docker/Dockerfile.prod.api
depends_on:
- "db"
- "memcached"
command: uwsgi --ini uwsgi.ini
volumes:
- badgr_server_api:/badgr_server
networks:
- badgr
# this container runs memcached
memcached:
image: 'bitnami/memcached:latest'
expose:
- "11211"
networks:
- badgr
# this container runs mysql (database)
db:
image: mysql:5.6.39
volumes:
- badgr_server_prod_db:/var/lib/mysql:rw
- ./.docker/etc/init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- "MYSQL_PASSWORD=password"
- "MYSQL_HOST=db"
- "MYSQL_ROOT_PASSWORD=password"
expose:
- "3306"
networks:
- badgr
# this container runs nginx (webserver) and uses the uwsgi app.sock file from prod_api via a volume
nginx:
build:
context: .
dockerfile: .docker/Dockerfile.nginx
volumes:
- badgr_server_api:/badgr_server
depends_on:
- "api"
networks:
- badgr
ports:
- "8080:80"
networks:
badgr:
driver: bridge
volumes:
badgr_server_api:
badgr_server_prod_db: