Add docker-compose to deployment
This commit is contained in:
parent
84ca68fbdc
commit
db2d455c02
@ -7,3 +7,9 @@
|
|||||||
dest: /home/hermansen/git/git.kjuulh.io/kjuulh/todo
|
dest: /home/hermansen/git/git.kjuulh.io/kjuulh/todo
|
||||||
single_branch: yes
|
single_branch: yes
|
||||||
version: production
|
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
2
src/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.proc.env
|
||||||
|
.staging.env
|
31
src/docker-compose.prod.yml
Normal file
31
src/docker-compose.prod.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user