-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
103 lines (95 loc) · 2.53 KB
/
docker-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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
version: "3.8"
services:
postgres:
image: postgres:14
stop_signal: SIGINT # Fast Shutdown mode
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_DB: "galv"
POSTGRES_PORT: "5432"
restart: unless-stopped
# Add a volume if you want to persist data between runs
# volumes:
# - .run/postgres_data:/var/lib/postgresql/data
# Backend server uses mail service to send activation emails
mailhog:
image: mailhog/mailhog
restart: unless-stopped
ports:
- "8085:8025"
- "1085:1025"
backend:
# For big development changes, best to target a specific SHA build rather than :latest in case backend changes.
# If you prefer, of course, you can target a real backend deployment by changing the frontend GALV_API_BASE_URL
image: ghcr.io/galv-team/galv-backend:latest
restart: unless-stopped
environment:
VIRTUAL_HOST: "localhost"
FRONTEND_VIRTUAL_HOST: "http://localhost:8002,https://localhost:8002,http://127.0.0.1:8002,https://127.0.0.1:8002"
DJANGO_SETTINGS: "dev"
DJANGO_SUPERUSER_PASSWORD: "admin"
DJANGO_LOCAL_DATA_STORAGE: "True"
ports:
- "8080:80"
depends_on:
- postgres
- mailhog
volumes:
- ./.schema:/spec
- ./.backend/datafiles:/data
frontend:
build:
context: .
dockerfile: Dockerfile_dev
args:
VITE_GALV_API_BASE_URL: "http://localhost:8082"
depends_on:
- backend
env_file:
- .env.vite
environment:
VITE_GALV_API_BASE_URL: "http://localhost:8080"
NODE_ENV: "development"
restart: unless-stopped
ports:
- "8002:8002"
volumes:
- ./src:/app/src
command: bash -c "(node _resource-check.js &) && pnpm start --host --port 8002"
# command: tail -F anything
frontend_test:
build:
context: .
dockerfile: Dockerfile_dev
env_file:
- .env.vite
restart: "no"
command: "pnpm test"
frontend_test_e2e:
build:
context: .
dockerfile: Dockerfile_cypress
env_file:
- .env.vite
restart: "no"
command: "pnpm cypress:e2e"
frontend_build:
build:
context: .
dockerfile: Dockerfile
args:
VITE_GALV_API_BASE_URL: "http://localhost:8082"
env_file:
- .env.vite
restart: "no"
command: "tree /usr/share/nginx/html"
docs:
build:
dockerfile: Dockerfile
context: ./docs
volumes:
- ./docs/source:/source
- ./docs/build-dev:/build
ports:
- "8003:8003"