-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.example.yml
More file actions
100 lines (92 loc) · 2.92 KB
/
Copy pathcompose.example.yml
File metadata and controls
100 lines (92 loc) · 2.92 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
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
# Example deployment stack for the website, backend, and direct runtime dependencies.
# Replace placeholder values before deploying.
services:
website:
# image: ghcr.io/programme-lv/website:latest
# To build this repo locally instead of pulling from GHCR, comment out
# image above and uncomment:
build:
context: .
dockerfile: Dockerfile
args:
NEXT_PUBLIC_API_HOST: "https://api.programme.lv"
environment:
NEXT_PUBLIC_API_HOST: "https://api.programme.lv"
SERVER_API_HOST: "http://backend:8080"
ports:
- "3000:3000"
depends_on:
backend:
condition: service_started
# To let an external Nginx Proxy Manager container reach this service,
# uncomment this and the networks section at the bottom.
# networks:
# - default
# - nginx-proxy-www
restart: unless-stopped
backend:
# image: ghcr.io/programme-lv/backend:latest
# To build the sibling backend repo locally instead of pulling from GHCR,
# comment out image above and uncomment:
build:
context: ../backend
dockerfile: Dockerfile
environment:
JWT_KEY: "replace-with-a-long-random-secret"
COOKIE_DOMAIN: "localhost"
POSTGRES_HOST: "postgres"
POSTGRES_PORT: "5432"
POSTGRES_USER: "programme"
POSTGRES_PW: "replace-postgres-password"
POSTGRES_DB: "programme"
POSTGRES_SSLMODE: "disable"
POSTGRES_MIGRATIONS_PATH: "/backend/postgres/migrate"
NATS_URL: "nats://nats:4222"
AWS_ACCESS_KEY_ID: "replace-aws-access-key-id"
AWS_SECRET_ACCESS_KEY: "replace-aws-secret-access-key"
S3_EXEC_BUCKET: "replace-exec-bucket"
S3_PUBLIC_BUCKET: "replace-public-bucket"
S3_TESTFILE_BUCKET: "replace-testfile-bucket"
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
nats:
condition: service_started
# To let an external Nginx Proxy Manager container reach this service,
# uncomment this and the networks section at the bottom.
# networks:
# - default
# - nginx-proxy-www
restart: unless-stopped
postgres:
image: postgres:17
environment:
POSTGRES_USER: "programme"
POSTGRES_PASSWORD: "replace-postgres-password"
POSTGRES_DB: "programme"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U programme -d programme"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
nats:
image: nats:2.11
command: ["-js", "--store_dir", "/data"]
volumes:
- nats-data:/data
restart: unless-stopped
volumes:
postgres-data:
nats-data:
# Example for joining an existing external Docker network used by Nginx Proxy
# Manager. Create the network outside this stack first if it does not exist:
# docker network create nginx-proxy-www
# networks:
# default:
# nginx-proxy-www:
# external: true