-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker-compose.test.yml
50 lines (46 loc) · 1.02 KB
/
docker-compose.test.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
version: '3.6'
services:
# Postgres server
tdb-postgres:
image: postgres:14-alpine
hostname: tdb-postgres
environment:
POSTGRES_DB: artgen
POSTGRES_USER: artgen
POSTGRES_PASSWORD: artgen
PGDATA: /var/lib/postgresql/data/pgdata
TZ: UTC
logging:
driver: "none"
# Test for Postgres
tinst-postgres:
image: node:16
working_dir: /srv
volumes:
- ./:/srv
environment:
ARTGEN_DATABASE_DSN: "postgres://artgen:artgen@tdb-postgres:5432/artgen"
command: yarn test
depends_on:
- tdb-postgres
restart: "no"
# Test for SQLite memory
tinst-sqlite-memory:
image: node:16
working_dir: /srv
volumes:
- ./:/srv
environment:
ARTGEN_DATABASE_DSN: "sqlite::memory:"
command: yarn test
restart: "no"
# Test for SQLite file
tinst-sqlite-file:
image: node:16
working_dir: /srv
volumes:
- ./:/srv
environment:
ARTGEN_DATABASE_DSN: "sqlite:./test.db"
command: yarn test
restart: "no"