-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (48 loc) · 1.15 KB
/
docker-compose.yml
File metadata and controls
52 lines (48 loc) · 1.15 KB
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
# Docker compose for local development and testing of the server and client
# with a Postgres database.
services:
# server tests the production Dockerfile build
server:
profiles: [ prod ]
build: .
environment:
DATABASE_URL: postgres://pgdev:pgdev@db:5432/dev
ports:
- 3000:3000
depends_on:
- db
# Development server - live reload for back end server
# This image will install diesel and run DB setup on launch
dev-server:
build:
context: .
dockerfile: docker/dev-server.dockerfile
environment:
DATABASE_URL: postgres://pgdev:pgdev@db:5432/dev
volumes:
- ./server:/app
ports:
- 3000:3000
depends_on:
- db
# Development client - live reload for front end client
dev-client:
build:
context: .
dockerfile: docker/dev-client.dockerfile
environment:
- SERVER_HOST=dev-server
volumes:
- ./client:/app
ports:
- 5173:5173
# Postgres database
db:
image: postgres
environment:
POSTGRES_USER: pgdev
POSTGRES_PASSWORD: pgdev
volumes:
- ./.data:/var/lib/postgresql/data
ports:
- 5432:5432