-
Notifications
You must be signed in to change notification settings - Fork 30
/
docker-compose.yml
82 lines (82 loc) · 1.75 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
version: '3'
services:
nginx:
image: nginx
restart: always
working_dir: /data/static
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./static:/data/static
# - ./cockpit_nginx.conf:/etc/nginx/conf.d/cockpit_nginx.conf
ports:
- "8000:80"
environment:
- NGINX_PORT=80
networks:
- app-network
depends_on:
- frodo_python
- frodo_golang
mysql:
image: webhippie/mariadb
restart: always
environment:
- MARIADB_DATABASE=fast_blog
- MARIADB_USER=root
- MARIADB_PASSWORD=yangzhikai668
- MARIADB_ROOT_PASSWORD=yangzhikai668
- MARIADB_ALLOW_EMPTY_PASSWORD=false
ports:
- '3307:3306'
volumes:
- my-datavolume:/var/lib/mysql
networks:
- app-network
redis:
image: redis:alpine
restart: always
networks:
- app-network
ports:
- '6378:6379'
command: redis-server /usr/local/etc/redis/redis.conf
volumes:
- /home/pi/redis_data:/data
- /home/Frodo/redis.conf:/usr/local/etc/redis/redis.conf
frodo_python:
image: frodo/pyweb:latest
restart: always
networks:
- app-network
ports:
- '9004:9004'
expose:
- '9004'
volumes:
- ./python_web:/app
- ./static:/code/app/static
depends_on:
- mysql
- redis
environment:
PYTHONPATH: $PYTHONPATH:/usr/local/src
command: 'uvicorn main:app --host 0.0.0.0 --port 9004'
frodo_golang:
image: frodo/goweb
restart: always
ports:
- '9003:9003'
expose:
- '9003'
depends_on:
- mysql
- redis
working_dir: /root
command: sh -c './admin'
networks:
- app-network
volumes:
my-datavolume:
networks:
app-network:
driver: bridge