add prod/local compose

This commit is contained in:
finn 2024-08-06 09:03:17 -07:00
parent bd5b04eeae
commit cd61c513c7
2 changed files with 8 additions and 0 deletions

View File

@ -1,6 +1,7 @@
services: services:
db: db:
image: mariadb:lts image: mariadb:lts
command: "--skip-name-resolve=OFF"
restart: always restart: always
healthcheck: healthcheck:
test: ['CMD', 'healthcheck.sh', '--connect', '--innodb_initialized'] test: ['CMD', 'healthcheck.sh', '--connect', '--innodb_initialized']
@ -30,6 +31,7 @@ services:
restart: always restart: always
# Comment following line to use flask (1worker, dev), uncomment to use uwsgi (wsgi) # Comment following line to use flask (1worker, dev), uncomment to use uwsgi (wsgi)
#command: ["uwsgi", "--http", "0.0.0.0:8000", "--master", "-p", "4", "-w", "microblog:app"] #command: ["uwsgi", "--http", "0.0.0.0:8000", "--master", "-p", "4", "-w", "microblog:app"]
container_name: backend
environment: environment:
- MYSQL_USER=flasku - MYSQL_USER=flasku
#- MYSQL_PASSWORD=flaskp #- MYSQL_PASSWORD=flaskp
@ -127,4 +129,6 @@ volumes:
networks: networks:
backnet: backnet:
name: backnet
frontnet: frontnet:
name: frontnet

View File

@ -1,6 +1,7 @@
services: services:
db: db:
image: mariadb:lts image: mariadb:lts
command: "--skip-name-resolve=OFF"
restart: always restart: always
healthcheck: healthcheck:
test: ['CMD', 'healthcheck.sh', '--connect', '--innodb_initialized'] test: ['CMD', 'healthcheck.sh', '--connect', '--innodb_initialized']
@ -30,6 +31,7 @@ services:
restart: always restart: always
# Comment following line to use flask (1worker, dev), uncomment to use uwsgi (wsgi) # Comment following line to use flask (1worker, dev), uncomment to use uwsgi (wsgi)
command: ["uwsgi", "--http", "0.0.0.0:8000", "--master", "-p", "4", "-w", "microblog:app"] command: ["uwsgi", "--http", "0.0.0.0:8000", "--master", "-p", "4", "-w", "microblog:app"]
container_name: backend
environment: environment:
- MYSQL_USER=flasku - MYSQL_USER=flasku
#- MYSQL_PASSWORD=flaskp #- MYSQL_PASSWORD=flaskp
@ -127,4 +129,6 @@ volumes:
networks: networks:
backnet: backnet:
name: backnet
frontnet: frontnet:
name: frontnet