-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
docker-compose.yml
64 lines (62 loc) · 1.59 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
version: '3.8'
services:
jetstream:
image: jetstream-app
init: true
depends_on:
db:
condition: service_healthy
env_file:
- .env
environment:
NODE_ENV: development
ENVIRONMENT: development
LOG_LEVEL: info
IS_LOCAL_DOCKER: true
JETSTREAM_POSTGRES_DBURI: postgres://postgres:postgres@postgres:5432/postgres
EXAMPLE_USER_OVERRIDE: true
EXAMPLE_USER_PASSWORD: 'EXAMPLE_123!'
JETSTREAM_CLIENT_URL: http://localhost:3333/app
JETSTREAM_SERVER_DOMAIN: localhost:3333
JETSTREAM_SERVER_URL: http://localhost:3333
NEXT_PUBLIC_CLIENT_URL: 'http://localhost:3333/app'
NEXT_PUBLIC_SERVER_URL: 'http://localhost:3333'
ports:
- '3333:3333'
links:
- db
db:
image: postgres:16.1-alpine
restart: always
hostname: postgres
environment:
- POSTGRES_USER=postgres
- PGUSER=postgres
- POSTGRES_PASSWORD=postgres
expose:
- 5432
ports:
- '5555:5432'
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
# this command checks if the database is ready directly on the source db server
test: ['CMD-SHELL', 'pg_isready']
interval: 5s
timeout: 5s
retries: 5
db_seed:
image: jetstream-app
command: >
bash -c "yarn db:migrate && yarn db:seed"
links:
- db
depends_on:
db:
condition: service_healthy
environment:
NODE_ENV: production
ENVIRONMENT: production
JETSTREAM_POSTGRES_DBURI: postgres://postgres:postgres@postgres:5432/postgres
volumes:
pgdata: