fix: update docker-compose for swarm compatibility with configs and overlay network
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m3s
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m3s
This commit is contained in:
@@ -1,10 +1,8 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: gitea.blyzer.com.br/blyzer/fasto:latest
|
image: gitea.blyzer.com.br/blyzer/fasto:latest
|
||||||
build: .
|
|
||||||
restart: unless-stopped
|
|
||||||
ports:
|
|
||||||
- "3001:3001"
|
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
- PORT=3001
|
- PORT=3001
|
||||||
@@ -12,18 +10,39 @@ services:
|
|||||||
- DB_USER=${DB_USER:-root}
|
- DB_USER=${DB_USER:-root}
|
||||||
- DB_PASSWORD=${DB_PASSWORD:-root_password}
|
- DB_PASSWORD=${DB_PASSWORD:-root_password}
|
||||||
- DB_NAME=${DB_NAME:-agenciac_comia}
|
- DB_NAME=${DB_NAME:-agenciac_comia}
|
||||||
depends_on:
|
ports:
|
||||||
- db
|
- "3001:3001"
|
||||||
|
deploy:
|
||||||
|
replicas: 1
|
||||||
|
restart_policy:
|
||||||
|
condition: on-failure
|
||||||
|
networks:
|
||||||
|
- fasto-net
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: mysql:8.0
|
image: mysql:8.0
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-root_password}
|
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-root_password}
|
||||||
MYSQL_DATABASE: ${DB_NAME:-agenciac_comia}
|
MYSQL_DATABASE: ${DB_NAME:-agenciac_comia}
|
||||||
volumes:
|
volumes:
|
||||||
- ./agenciac_comia.sql:/docker-entrypoint-initdb.d/init.sql
|
|
||||||
- db_data:/var/lib/mysql
|
- db_data:/var/lib/mysql
|
||||||
|
configs:
|
||||||
|
- source: init_sql
|
||||||
|
target: /docker-entrypoint-initdb.d/init.sql
|
||||||
|
deploy:
|
||||||
|
replicas: 1
|
||||||
|
restart_policy:
|
||||||
|
condition: on-failure
|
||||||
|
networks:
|
||||||
|
- fasto-net
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db_data:
|
db_data:
|
||||||
|
|
||||||
|
configs:
|
||||||
|
init_sql:
|
||||||
|
file: ./agenciac_comia.sql
|
||||||
|
|
||||||
|
networks:
|
||||||
|
fasto-net:
|
||||||
|
driver: overlay
|
||||||
|
|||||||
Reference in New Issue
Block a user