aboutsummaryrefslogtreecommitdiff
path: root/docker-compose.yml
diff options
context:
space:
mode:
Diffstat (limited to 'docker-compose.yml')
-rw-r--r--docker-compose.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..a3f011e
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,33 @@
+version: '3'
+services:
+ thulani:
+ image: thulani
+ build: .
+ depends_on:
+ - db
+ - migrate
+
+ environment:
+ DATABASE_URL: "postgres://thulani:clickheretodie@db/memes"
+ RUST_BACKTRACE: 1
+
+ db:
+ image: postgres:latest
+ restart: always
+ volumes:
+ - db-data:/var/lib/postgresql/data
+ environment:
+ POSTGRES_USER: thulani
+ POSTGRES_PASSWORD: clickheretodie
+ POSTGRES_DB: memes
+
+ migrate:
+ build:
+ context: .
+ dockerfile: Dockerfile-migrate
+ restart: on-failure
+ depends_on:
+ - db
+
+volumes:
+ db-data: