-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
65 lines (61 loc) · 1.64 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
services:
db:
image: postgres:14-alpine
environment:
POSTGRES_DB: ${DATABASE_NAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_USER: ${DATABASE_USERNAME}
PGPORT: ${DATABASE_PORT}
logging:
driver: "none"
restart: unless-stopped
hostname: ${DOCKER_DB_HOSTNAME}
volumes:
- db-data:/var/lib/postgresql/data
ports:
- "${DATABASE_PORT}:${DATABASE_PORT}"
container_name: ${DOCKER_DB_CONTAINERNAME:-2a5-db-development}
networks:
- 2a5
api:
build:
context: .
dockerfile: Dockerfile
target: ${DOCKER_API_TARGET:-dev}
depends_on:
- db
environment:
DATABASE_URL: "postgresql://${DATABASE_USERNAME}:${DATABASE_PASSWORD}@${DOCKER_DB_HOSTNAME}:${DATABASE_PORT}/${DATABASE_NAME}"
ADMIN_TOKEN: ${ADMIN_TOKEN}
LINK_PROTOCOL: ${LINK_PROTOCOL}
LINK_HOSTNAME: ${LINK_HOSTNAME}
LINK_PORT: ${LINK_PORT}
hostname: ${DOCKER_API_HOSTNAME:-2a5-api-development}
ports:
- "${DOCKER_API_PORT:-3000}:3000"
container_name: ${DOCKER_API_CONTAINERNAME:-2a5-api-development}
networks:
- 2a5
command: npm run dev
develop:
watch:
- action: sync
path: ./lib
target: /app/lib
- action: sync
path: ./pages
target: /app/pages
- action: sync
path: ./public
target: /app/public
- action: sync
path: ./middleware.ts
target: /app/middleware.ts
- action: rebuild
path: package.json
volumes:
db-data:
name: ${DOCKER_DB_VOLUMENAME:-2a5-db-data-development}
networks:
2a5:
name: 2a5