forked from JacobSNGoodwin/memrizr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
56 lines (56 loc) · 1.47 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
version: "3.8"
services:
reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.2
# Enables the web UI and tells Traefik to listen to docker
command:
- "--api.insecure=true"
- "--providers.docker"
- "--providers.docker.exposedByDefault=false"
ports:
# The HTTP port
- "80:80"
# The Web UI (enabled by --api.insecure=true)
- "8080:8080"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
postgres-account:
image: "postgres:alpine"
environment:
- POSTGRES_PASSWORD=password
ports:
- "5432:5432"
volumes:
- "pgdata_account:/var/lib/postgresql/data"
command: ["postgres", "-c", "log_statement=all"]
redis-account:
image: "redis:alpine"
ports:
- "6379:6379"
volumes:
- "redisdata:/data"
account:
build:
context: ./account
target: builder
image: account
env_file: ./account/.env.dev
expose:
- "8080"
labels:
- "traefik.enable=true"
- "traefik.http.routers.account.rule=Host(`malcorp.test`) && PathPrefix(`/api/account`)"
environment:
- ENV=dev
volumes:
- ./account:/go/src/app
# have to use $$ (double-dollar) so docker doesn't try to substitute a variable
depends_on:
- postgres-account
- redis-account
command: reflex -r "\.go$$" -s -- sh -c "go run ./"
volumes:
pgdata_account:
redisdata: