This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
82 lines (76 loc) · 1.72 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: "2.4"
services:
server:
build:
context: .
target: dev
volumes:
- ./Cargo.toml:/app/Cargo.toml
- ./Cargo.lock:/app/Cargo.lock
- ./src:/app/src
- ./packages:/app/packages
- target:/app/target
- cargo:/cargo
environment:
CARGO_HOME: /cargo
PGQL_HOST: 0.0.0.0
PGQL_DB_URL: "host=db user=pgql password=pgql"
RUST_BACKTRACE: 1
RUST_LOG: pgql
networks:
- pgql
- db
- reverse-proxy
labels:
traefik.backend: "server_pgql"
traefik.port: "8080"
traefik.docker.network: "reverse-proxy"
traefik.enable: "true"
traefik.frontend.rule: "HostRegexp:pgql.{ip:[0-9.]+}.nip.io"
db:
image: postgres:12-alpine
environment:
POSTGRES_PASSWORD: pgql
POSTGRES_USER: pgql
POSTGRES_DB: pgql
ports:
- "5432:5432"
networks:
- db
adminer:
image: adminer:4.7.6
environment:
ADMINER_DESIGN: flat
ADMINER_PLUGINS: enum-option enum-types struct-comments tables-filter
labels:
traefik.backend: "adminer_pgql"
traefik.port: "8080"
traefik.docker.network: "reverse-proxy"
traefik.enable: "true"
traefik.frontend.rule: "HostRegexp:adminer.pgql.{ip:[0-9.]+}.nip.io"
networks:
- reverse-proxy
- db
tests:
build:
context: .
target: dev-tests
volumes:
- ./tests:/app/tests
- target:/app/target:ro
command: app/tests/run.sh
environment:
PGQL_DB_URL: "host=db user=pgql password=pgql dbname=pgql_test"
networks:
- db
networks:
db: ~
pgql: ~
reverse-proxy:
external:
name: reverse-proxy
volumes:
target:
driver: local
cargo:
driver: local