Add docker-compose to deployment

This commit is contained in:
Kasper Juul Hermansen 2021-11-14 18:56:17 +01:00
parent 84ca68fbdc
commit db2d455c02
Signed by: kjuulh
GPG Key ID: 0F95C140730F2F23
3 changed files with 39 additions and 0 deletions

View File

@ -7,3 +7,9 @@
dest: /home/hermansen/git/git.kjuulh.io/kjuulh/todo
single_branch: yes
version: production
- name: deploy remote docker containers using compose
community.docker.docker_compose:
project_src: ../src/
files:
- docker-compose.prod.yml

2
src/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.proc.env
.staging.env

View File

@ -0,0 +1,31 @@
version: "3"
services:
db:
build:
context: backend/db
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
server:
build:
context: backend/server
ports:
- 5000:80
environment:
MONGODB__Username: root
MONGODB__Password: example
MONGODB__Host: db
MONGODB__Port: 27017
MONGODB__Database: todo
depends_on:
- db
client:
build:
context: client
ports:
- 3000:3000