This commit is contained in:
kev 2020-10-22 14:41:34 +08:00
parent 414672f1a6
commit aacfd8a6f6
3 changed files with 11 additions and 9 deletions

View File

@ -10,11 +10,13 @@ postgres:
image: postgres:alpine
ports:
- "5432:5432"
volumes:
- ./data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
restart: always
restart: unless-stopped
```
## up and running
@ -22,7 +24,7 @@ postgres:
```bash
$ docker-compose up -d
$ docker-compose exec postgres psql -U root postgres
$ docker-compose exec postgres psql -U postgres postgres
>>> SELECT CURRENT_TIMESTAMP;
now
-------------------------------

View File

@ -5,7 +5,7 @@ postgres:
volumes:
- ./data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
restart: always
restart: unless-stopped

View File

@ -4,5 +4,5 @@ scrapyd:
- "6800:6800"
volumes:
- ./data:/var/lib/scrapyd
- /usr/local/lib/python2.7/dist-packages
restart: always
- /usr/local/lib/python3.7/dist-packages
restart: unless-stopped