-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdocker-compose.yml
65 lines (58 loc) · 1.26 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
version: "3.7"
x-template: &app
build:
context: .
dockerfile: Dockerfile
target: builder
args:
MUOXI_UID: ${UID:-1000}
MUOXI_USERNAME: ${USER:-you}
MUOXI_INSTALL_DIR: ${MUOXI_INSTALL_DIR:-/opt/muoxi}
image: thelastinuit/muoxi:development
volumes:
- .:${MUOXI_INSTALL_DIR}
networks:
- backend
stdin_open: true
tty: true
depends_on:
- postgres
- redis
env_file:
./.env
command: "/bin/sh -i"
volumes:
postgres_data:
redis_data:
networks:
backend:
services:
migration:
<<: *app
command: "/bin/sh -c \"$${MUOXI_INSTALL_DIR}/dev-entrypoint.sh diesel migration run\""
server:
<<: *app
command: "/bin/sh -c \"$${MUOXI_INSTALL_DIR}/dev-entrypoint.sh cargo run --bin muoxi_staging\""
ports:
- ${MUOXI_SERVER_PORT:-8000}:8000
redis:
image: redis:5.0-alpine
ports:
- ${REDIS_PORT:-6379}:6379
volumes:
- redis_data:/data
command: redis-server
networks:
- backend
postgres:
build:
context: .
dockerfile: Dockerfile.postgres
target: muoxi-postgres
image: muoxi/postgres:development
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: postgres
networks:
- backend