-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
69 lines (69 loc) · 1.69 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
65
66
67
68
69
# production config
version: "3.4"
services:
web:
image: "${IMAGE_PREFIX}/web:${IMAGE_TAG}"
build:
context: ./web
dockerfile: ./Dockerfile
target: prod
depends_on:
# db:
# condition: service_healthy
- db
- redis
environment:
- NODE_ENV=production
- DEBUG
- WEBSITE_URL
- DATABASE_URL=postgres://app:${APP_DB_PASSWORD}@db:5432/app?sslmode=disable
# TODO: find why dbmate ignores these env variables
#- DBMATE_MIGRATIONS_DIR=./src/db/migrations
#- DBMATE_SCHEMA_FILE=./src/db/schema.sql
- SESSION_SECRET
- GOOGLE_ID
- GOOGLE_SECRET
- TWITTER_KEY
- TWITTER_SECRET
# nginx config
- VIRTUAL_HOST=${DOMAIN}
- VIRTUAL_PORT=3000
- HTTPS_METHOD=noredirect
- NEXT_PUBLIC_GTM_ID
devops:
image: "${IMAGE_PREFIX}/devops:${IMAGE_TAG}"
build:
context: ./
dockerfile: ./devops/Dockerfile
depends_on:
- db
environment:
- DATABASE_URL=postgres://app:${APP_DB_PASSWORD}@db:5432/app?sslmode=disable
dbmate:
image: "${IMAGE_PREFIX}/dbmate:${IMAGE_TAG}"
build: ./dbmate
depends_on:
- db
environment:
- DATABASE_URL=postgres://app:${APP_DB_PASSWORD}@db:5432/app?sslmode=disable
db:
image: postgres:14.1-alpine3.14
volumes:
- db_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
healthcheck:
test: pg_isready -U postgres -h 127.0.0.1
interval: 5s
redis:
image: redis:6.2.6-alpine3.14
adminer:
image: adminer:4.8.1
restart: unless-stopped
ports:
- "${ADMINER_PORT}:8081"
depends_on:
- "db"
volumes:
db_data: