student life social platform
1services:
2 db:
3 image: postgres:16
4 ports:
5 - 5432:5432
6 environment:
7 - POSTGRES_PASSWORD=dev
8
9 smtp:
10 profiles:
11 - mails
12 image: mailhog/mailhog
13 ports:
14 - 1025:1025
15 - 8025:8025
16
17 redis:
18 image: redis/redis-stack:7.2.0-v11
19 ports:
20 - 6379:6379
21 - 8001:8001
22
23 notella:
24 image: registry.inpt.fr/churros/notella:v0.17.0
25 profiles:
26 - notella
27 env_file:
28 - .env
29 ports:
30 - 8080:8080
31 environment:
32 - DATABASE_URL=${DATABASE_URL}
33 - REDIS_URL=${REDIS_URL}
34 - NATS_URL=nats://nats:4222
35 - PUBLIC_VAPID_KEY=${PUBLIC_VAPID_KEY}
36 - VAPID_PRIVATE_KEY=${VAPID_PRIVATE_KEY}
37 - CONTACT_EMAIL=${PUBLIC_CONTACT_EMAIL}
38 - FIREBASE_SERVICE_ACCOUNT=${FIREBASE_ADMIN_SERVICE_ACCOUNT_KEY}
39 - STARTUP_SCHEDULE_RESTORATION=enabled # enabled, disabled, eager
40 - APP_PACKAGE_ID=${PUBLIC_APP_PACKAGE_ID}
41 - HEALTH_CHECK_PORT=8080
42 - DEBUG=1
43 command: >
44 sh -c 'export DATABASE_URL=$${DATABASE_URL/localhost/db} && export REDIS_URL=$${REDIS_URL/localhost/redis} && exec /app/notella'
45
46 nats:
47 profiles:
48 - notella
49 image: nats:2.10.25
50 ports:
51 - '8222:8222'
52 - '4222:4222'
53 volumes:
54 - ./nats-dev-server.conf:/nats-server.conf
55 command: ['-c', '/nats-server.conf']
56
57 prometheus:
58 profiles:
59 - prometheus
60 image: prom/prometheus
61 ports:
62 - 9090:9090
63 # allow access to host's localhost from within the container
64 extra_hosts:
65 - 'host.docker.internal:host-gateway'
66 volumes:
67 - ${PWD}/prometheus-mock-config.yaml:/prometheus.yml
68 command:
69 - '--config.file=/prometheus.yml'
70 - '--storage.tsdb.path=/prometheus'