-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
55 lines (50 loc) · 1.03 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
55 lines (50 loc) · 1.03 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
version: '3'
services:
postgres:
container_name: 'test-postgres'
image: 'postgres:latest'
restart: always
ports:
- '15432:5432'
networks:
- my-network
volumes:
- 'pgdata:/var/lib/postgresql/data/'
environment:
POSTGRES_USER: /run/secrets/postgres_user
POSTGRES_PASSWORD: /run/secrets/postgres_password
secrets:
- postgres_password
- postgres_user
expose:
- 5432
next:
container_name: 'test-next'
restart: unless-stopped
image: node:16
command: npm run dev
ports:
- '3000:3000'
volumes:
- .:/srv/next:rw
working_dir: /srv/next
environment:
DATABASE_URL: /run/secrets/postgres_url
secrets:
- postgres_url
depends_on:
- postgres
networks:
- my-network
secrets:
postgres_password:
file: ./postgres_password.txt
postgres_user:
file: ./postgres_user.txt
postgres_url:
file: ./postgres_url.txt
volumes:
pgdata: {}
networks:
my-network:
driver: bridge