-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
42 lines (37 loc) · 1.17 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
version: "2"
services:
rust:
image: rust:latest
volumes:
- ./:/usr/src/app
- cargo-cache:/usr/local/cargo/registry
- target-cache:/usr/src/app/target
links: # Links are deprecated, experiment in removing this line and still getting the whole thing to work.
- postgres_test
- mysql_test
environment:
POSTGRES_DB_ORIGIN: 'postgres://user:example@postgres_test:5432'
POSTGRES_ADMIN_URL: 'postgres://user:example@postgres_test:5432/postgres'
MYSQL_DB_ORIGIN: 'mysql://root:password@mysql_test:3306'
MYSQL_ADMIN_URL: 'mysql://root:password@mysql_test:3306'
working_dir: /usr/src/app
postgres_test:
image: "postgres:11"
container_name: postgres_test
volumes:
- pgdata:/var/lib/postgresql/data/pgdata
environment:
POSTGRES_PASSWORD: example
POSTGRES_USER: user
POSTGRES_DB: diesel_test_setup
PGDATA: /var/lib/postgresql/data/pgdata
mysql_test:
image: mysql:8
container_name: mysql_test
environment:
MYSQL_ROOT_PASSWORD: "password"
command: --default-authentication-plugin=mysql_native_password
volumes:
pgdata: {}
target-cache:
cargo-cache: