forked from azimuttapp/azimutt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
34 lines (34 loc) · 1.12 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
services:
database:
image: postgres
restart: always
container_name: azimutt-db
volumes:
- pg-data:/var/lib/postgresql/data
environment: # Used by the postgres image to setup a default user. For security reason, you should avoid using the postgres user
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: azimutt_dev
backend:
container_name: azimutt-backend
platform: linux/amd64
restart: always
build:
context: .
dockerfile: Dockerfile
args:
MIX_ENV: ${MIX_ENV}
depends_on:
- database
ports: # Docker need to expose ports for you to access your app.
- 4000:4000
env_file: .env
environment:
DATABASE_URL: ${DATABASE_URL} # This pulls from the .env file
# Template : "ecto://db_user:db_password@ip_or_compose_service_name/db_name"
SECRET_KEY_BASE: "1wOVZ9rWAqPcbVZdilZzBPLXFKNrUmLUzX0q9Z02LpOy2jVWZwa6ee4fU81tuN+W" # Can literally be anything, but generally generated randomly by tools like mix phx.gen.secret
volumes:
- uploads-data:/app/bin/uploads
volumes:
pg-data:
uploads-data: