fix phoneof and service template

This commit is contained in:
Elizabeth Hunt 2025-01-02 16:44:54 -08:00
parent f8a3722bdf
commit fe6d55e788
Signed by: simponic
GPG Key ID: 2909B9A7FF6213EE
5 changed files with 16 additions and 7 deletions

View File

@ -90,12 +90,11 @@ function add_nginx_config() {
ssl_prefer_server_ciphers on;
location / {
proxy_pass https://127.0.0.1:$SERVICE_PORT;
proxy_pass http://127.0.0.1:$SERVICE_PORT;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection \"upgrade\";
proxy_set_header Host \$server_name;
proxy_redirect http:// https://;
proxy_buffering off;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
@ -134,6 +133,14 @@ function create_role() {
group: root
mode: 0700
- name: ensure $SERVICE db exist
file:
path: /etc/docker/compose/$SERVICE/db
state: directory
owner: root
group: root
mode: 0777
- name: build $SERVICE docker-compose.yml.j2
template:
src: ../templates/docker-compose.yml.j2

View File

@ -7,6 +7,12 @@
group: root
mode: 0700
- name: ensure phoneof db exist
file:
path: /etc/docker/compose/phoneof/db
state: directory
mode: 0777
- name: build phoneof docker-compose.yml.j2
template:
src: ../templates/docker-compose.yml.j2

View File

@ -12,7 +12,5 @@ services:
env_file: .env
volumes:
- ./db:/app/db
- ./templates:/app/templates
- ./static:/app/static
ports:
- "127.0.0.1:19191:8080"

View File

@ -13,7 +13,7 @@ type Migrator func(*sql.DB) (*sql.DB, error)
func DoNothing(dbConn *sql.DB) (*sql.DB, error) {
log.Println("doing nothing")
_, err := dbConn.Exec(`DO NOTHING;`)
_, err := dbConn.Exec(`SELECT 0;`)
if err != nil {
return dbConn, err
}

View File

@ -12,7 +12,5 @@ services:
env_file: .env
volumes:
- ./db:/app/db
- ./templates:/app/templates
- ./static:/app/static
ports:
- "127.0.0.1:{{ service_port }}:8080"