-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
51 lines (47 loc) · 1.31 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
version: "3.7"
services:
ant-who-tweets:
build:
context: ./
dockerfile: ./projects/ant-who-tweets/Dockerfile
environment:
TWITTER_CREDS_FILE: /run/secrets/twitter_creds
DATABASE_CREDS_FILE: /run/secrets/database_creds
DB_HOST: 172.17.0.1 # Default 'bridge' IP of docker? Somehow it works! TODO: find a better way
secrets:
- twitter_creds
- database_creds
ant-data-farm:
build:
context: ./projects/ant-data-farm
dockerfile: Dockerfile
restart: always
ports:
- "7000:5432" # Map a types-of-ants port 7000 to the postgres default port 5432
env_file: ./.env.db
environment:
PGDATA: /var/lib/postgresql/data/
volumes:
- ./projects/ant-data-farm/database-files:/var/lib/postgresql/data
secrets:
- database_creds
ant-gateway:
container_name: ant-gateway
build:
context: ./projects/ant-gateway
dockerfile: Dockerfile
args:
- FQDN=beta.typesofants.org
- ANT_WORKER_NUM=002
- WEBSERVER_PORT=3499
- SSL_CERT_PATH=./data/beta.typesofants.org/cert.pem
- SSL_KEY_PATH=./secrets/ssl/beta.typesofants.org/key.pem
restart: always
ports:
- "80:80"
- "443:443"
secrets:
twitter_creds:
file: ./.env.twitter
database_creds:
file: ./.env.db