forked from photoview/photoview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev-compose.yaml
83 lines (79 loc) · 1.65 KB
/
dev-compose.yaml
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
83
name: photoview
services:
dev-ui:
image: photoview/ui
build:
context: .
dockerfile: Dockerfile
target: ui
env_file: ui/example.env
volumes:
- .:/app:rw
ports:
- 1234:1234
command:
- /bin/bash
- -c
- |
npm ci
npm run mon
dev-api:
image: photoview/api
build:
context: .
dockerfile: Dockerfile
target: api
env_file: api/example.env
environment:
PHOTOVIEW_DATABASE_DRIVER: sqlite # Change to the right database driver
PHOTOVIEW_SQLITE_PATH: photoview.db
PHOTOVIEW_MYSQL_URL: photoview:photosecret@tcp(mysql)/photoview_test
PHOTOVIEW_POSTGRES_URL: postgres://photoview:photosecret@postgres:5432/photoview_test
volumes:
- .:/app:rw
ports:
- 4001:4001
command:
- /bin/bash
- -c
- |
source /app/scripts/set_compiler_env.sh
reflex -g '*.go' -s -- go run .
mariadb:
image: mariadb:lts
profiles:
- mysql
environment:
MYSQL_DATABASE: photoview_test
MYSQL_USER: photoview
MYSQL_PASSWORD: photosecret
MYSQL_RANDOM_ROOT_PASSWORD: yes
healthcheck:
test:
- CMD
- mariadb-admin
- --user=photoview
- --password=photosecret
- ping
interval: 20s
timeout: 5s
retries: 10
expose:
- "3306"
postgres:
image: postgres:16-alpine
profiles:
- postgres
environment:
POSTGRES_DB: photoview_test
POSTGRES_USER: photoview
POSTGRES_PASSWORD: photosecret
healthcheck:
test:
- CMD
- pg_isready
interval: 20s
timeout: 5s
retries: 10
expose:
- "5432"